I am currently struggling to get the right config in IIS, as I am normally using Unix servers and nginx.
I have a reverse proxy (nginx) that forwards all requests to subdomain.domain.com/xxx to my IIS server.
Here I have a website that hosts a PHP application. I created a virtual directory xxx. Without this virtual directory, subdomain.domain.com is treated as root, and IIS look for directory xxx (which does not exist).
I have pointed both the website and the virtual directory to the same physical path. I then get an error, because one config is written twice to the web.config.
If I change the physical directory of the website, the application won`t work, because it uses the websites physical directory in its configuration.
Any help as to how this should be configured is greatly appreciated, I am starting to lose my mind in all this UI boxes of IIS.
Relevant part of the nginx conf:
location /spc {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_pass https://xx.xx.de:9443;
}
proxy_pass https://xx.xx.de:9443/;
, as the extra/
should solve the path issue.