Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Redirect traffic via campus connection

$
0
0
HI Guys

I am very new to reverse proxy or proxy in general. I know this is what I need but am not sure where to start.
I do support for a collage that has full access to a website without having to login first. The site obviously checks what IP the traffic is cumming from and if it is there site/IP, full access is granted. The public needs to specify username and password to get full access to this site. The problem is most students are distant learners so they never go onsite. Students need access to this site from home without needing to login.
The site they are trying to access is an external website.

I have created a dns account website.mydomain.com and point it to my reverse proxy onsite.
So when clients go to website.mydomain.com this does redirect client to the correct site but the site picks up the clients public IP and not my sites ip and requests login details.

How can I set NGINX to keep the connection and stream the trafic threw the campus connection and not just forward the connection on.

This is my setup in NGINX

/etc/nginx/sites-enabled/default

server {
listen 192.168.1.18;
server_name website.mydomain.com;
location / {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://www.informationsite.com;
}
}

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>