Welcome! Log In Create A New Profile

Advanced

Reverse Proxy IIS Web Applications

Posted by cdixon13660 
Reverse Proxy IIS Web Applications
June 27, 2016 12:45PM
Hi. I am trying to setup a reverse proxy in front of an application server that is running IIS. Currently the only way I can get it to fully work
is to use the hostname of the application server. If I try to use a different url, the application breaks internally.

How it breaks. You can log into the main web application and any content that is under the application /APP1 you can see. When one of the links tries to open APP2 in an iframe, the page will not display. Hovering over the link you can see the https://hostname/APP2 instead of https://web.exp.org/APP2. Does anyone have any suggestions as to what I need to do in order to get this to work? I've included a sample basic configuration of what I have right now.

In the sample configuration I have tried to use IP's instead of url's with no change in behavior.

server {
listen 80;
server_name *.exp.org;
return 302 https://web.exp.org/APP1/;
}

server {
listen 443;
server_name web.exp.org;
ssl on;

location / {
proxy_pass https://main.exp.org;
proxy_set_header HOST $host;
proxy_cache one;

}
location /APP1 {
proxy_pass https://main.exp.org/APP1;
proxy_set_header HOST $host;
proxy_cache one;

}
location /APP2 {
proxy_pass https://main.exp.org/APP2;
proxy_set_header HOST $host;
proxy_cache one;
}
location /images {
proxy_pass https://main.exp.org/images;
proxy_set_header HOST $host;
proxy_cache one;
}
}
Re: Reverse Proxy IIS Web Applications
June 27, 2016 01:24PM
It sounds like the IIS app is rewriting the url based on it's (IIS) configuration, when using a proxy you often need to tell the app behind the proxy what the address(or name) is of this new frontend.
If it is going wrong before passing then look at the logfiles to see what the client is asking for (url) and which location block is handling it.

---
nginx for Windows http://nginx-win.ecsds.eu/
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 103
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