我想要phpMyAdmin在另一个端口下运行,并通过/pma/到127.0.0.1:8081所有请求
那是我的Nginxconfiguration
server { listen 80; ... location /pma/ { proxy_pass http://127.0.0.1:8081/; proxy_redirect off; proxy_set_header Host $host; } location ~ \.php$ { ... } }
现在,当我请求http://domain.com/pma/phpinfo.php location ~ \.php$接pipe控制,我得到了404。是否有可能总是将请求传递到http://127.0.0.1:8081何时到/pma/ ?
是。
location ^~ /pma/ { ... }
^~会阻止nginx查找正则expression式的位置。