I need to configure nginx as reverse proxy. It should allow access to /phpmyadmin with a reverse proxy to private_ip:5000. This is part of nginx.conf:
location ~ /phpmyadmin {
rewrite ^.*\/phpmyadmin(\/?)(.*)$ /$2 break;
proxy_pass https://192.168.99.6:5000;
proxy_redirect off;
proxy_set_header Host $host;
}
And this config works except in cases:
- https://192.168.99.6:5000/phpmyadmin. But with a
/
at the end, that's okay. - I get a 404 error after logging in, but if I press "back" everything is fine.
- I also get 404 error after logging out.
Please help me fix this. All services are in the k8s cluster.