My company uses a webapp that's reachable on http://10.10.10.20/WebAPP running on IIS on Windows Server 2019.
Now, said WebAPP needs to be accessible via the internet, and thus SSL is needed - no problem I thought, I'll use NGINX as reverse proxy, as we do for many other sites, and call it a day.
But I then found out that WebAPP does not like very much when the requested URI is anything other than it's IP or Windows NetBIOS name.
So when trying to go to https://app.company.se/WebAPP I get a 500 Internal HTTP error, and looking through the logs for WebAPP sees that the request is coming from app.company.se/WebAPP which it does not like.
My NGINX configuration is as follows:
server {
server_name webapp.company.com;
location / {
proxy_pass http://10.10.10.20;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
}
}
I have also tried adding: proxy_set_header X-Forwarded-Host "http://10.10.10.20/"
to trick the webapp, but no dice.
So I think I just have to configure NGINX to simply not inform the WebAPP that there's someone else behind the NGINX Reverse Proxy asking for data, and as far as the WebAPP goes - the reverse proxy is the only one accessing the WebAPP.
Is this possible?