ssl - how to prevent Nginx to redirect location to a configured proxy_pass url and port number -


hi guys having problem nginx, have configure phpmyadmin run nginx phpmyadmin configured run on port 8080. access phpmyadmin via localhost/phpmyadmin , give me proper login screen below.

phpmyadmin login screen

after login url on address bar changes configure port localhost/phpmyadmin localhost:8080/phpmyadmin , throws

error message

here nginx configuration:

server{     listen 443 ssl;     ssl_dhparam /etc/ssl/certs/dhparam.pem;     ssl_certificate /etc/certificate/live/localhost/permission.pem;     ssl_certificate_key /etc/certificate/live/localhost/privkey.pem;     include /etc/certificate/live/localhost/ssl-nginx.conf;      access_log /var/log/nginx/apache2-access.log;     error_log /var/log/nginx/apache2-error.log;  location /phpmyadmin{         proxy_set_header x-forwarded-host $host;         proxy_set_header x-forwarded-server $host;         proxy_set_header host $http_host;         proxy_set_header x-ssl on;         proxy_set_header x-nginx-proxy true;         proxy_set_header x-forwarded-for $proxy_add_x_forwarded_for;         proxy_pass http://127.0.0.1:8080/phpmyadmin;         proxy_redirect off;     } 

}

thanks in advance.

you should not using proxy_redirect off;. want change redirects

location /phpmyadmin{         proxy_set_header x-forwarded-host $host;         proxy_set_header x-forwarded-server $host;         proxy_set_header host $http_host;         proxy_set_header x-ssl on;         proxy_set_header x-nginx-proxy true;         proxy_set_header x-forwarded-for $proxy_add_x_forwarded_for;         proxy_pass http://127.0.0.1:8080/phpmyadmin;         proxy_redirect http://127.0.0.1:8080/ $scheme://$host/;         proxy_redirect http://localhost:8080/ $scheme://$host/;         proxy_cookie_domain 127.0.0.1 $host;         proxy_cookie_domain localhost $host;     } 

and want setup cookie login works


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -