I am using nginx
as a reverse proxy and when I login in my web interface I am redirected to the proxied URL. I would like to avoid it and always keep the "server_name" as the URL. Is it possible?
This is my /etc/nginx/conf.d/my_app.conf
:
server {
listen 443 ssl;
server_name my-app.net;
ssl_certificate /etc/pki/tls/certs/my-app.cer;
ssl_certificate_key /etc/pki/tls/private/my-app.key;
ssl_protocols TLSv1.1 TLSv1.2;
access_log /var/log/nginx/my-app.access.log main;
location / {
proxy_pass http://ip_of_the_app:7180/;
proxy_redirect off;
}
}
I connect on http://my-app.net
, enter login information, I am then redirected to http://ip_of_the_app:7180
at the same login page, and I have to login again. Can this double login be avoided?