Welcome! Log In Create A New Profile

Advanced

Help how to Proxy without redirect

October 31, 2016 09:11AM
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 ?
Thanks


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_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4;
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_pass http://192.168.1.60:38080;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;


}
}
Subject Author Posted

Help how to Proxy without redirect

tbaror October 31, 2016 09:11AM

Re: Help how to Proxy without redirect

Francis Daly November 03, 2016 03:08PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 211
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready