I want to have phpMyAdmin running under another port and pass all requests that go to /pma/
to 127.0.0.1:8081
Thats my Nginx config
server {
listen 80;
...
location /pma/ {
proxy_pass http://127.0.0.1:8081/;
proxy_redirect off;
proxy_set_header Host $host;
}
location ~ \.php$ {
...
}
}
Now when I request http://domain.com/pma/phpinfo.php
location ~ \.php$
takes over the control and I get a 404. Is it possible to always pass the request to http://127.0.0.1:8081
when its to /pma/
?
Yes.
^~
will prevent nginx to look for regexp locations.