Help how to Proxy without redirect

tbaror nginx-forum at
Mon Oct 31 13:11:59 UTC 2016

Hello All,

I need to use Nginx as proxy and to pass all  communication trough it
without redirecting to original web location.
I have following configuration file the initial logon and welcome page works
well as soon as i click on link its getting redirected in to the original
web page.
any idea how to keep it on the proxy ?

server {
listen 80;
return 301 https://$host$request_uri;

server {

listen 443;
server_name gfn-docker.daet.local;

ssl_certificate /etc/nginx/cert.crt;
ssl_certificate_key /etc/nginx/cert.key;

ssl on;
ssl_session_cache shared:SSL:30m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;

access_log /var/log/nginx/jenkins.access.log;

location / {
auth_basic "Restricted Content";
auth_basic_user_file /etc/nginx/.htpasswd;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;


Posted at Nginx Forum:,270653,270653#msg-270653

More information about the nginx mailing list