1

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;
} 
3
  • 2
    You have to show us what settings you use to "forwards all requests to subdomain.domain.com/xxx to my IIS server" by editing the question to include the relevant portion of your nginx config file.
    – Lex Li
    Jul 13, 2022 at 14:15
  • Ive edited the description accordingly
    – T.Bremkes
    Jul 14, 2022 at 8:03
  • You might try to use proxy_pass https://xx.xx.de:9443/;, as the extra / should solve the path issue.
    – Lex Li
    Jul 17, 2022 at 6:56

0

You must log in to answer this question.

Browse other questions tagged .