I am working in a test environment and set up an apache2 webserver in a Ubuntu 21 VM and an IIS webserver within a local network to learn about proxy server functionality. In these first tests I use http.
The apache2 is used as reverse proxy and is working well so far. The apache2 is reached by the public subdomain http://sub.testdom.com by http. Now I would like to change the http-Port of the IIS webserver from default 80 TCP to 4000 TCP.
It was easy to add port 4000 TCP to the IIS and to open port 4000 in the internal firewall of the IIS for incoming traffic.
Using my VHOST-config listet below the problem now is that port 4000 is integrated in the URLs which are in the proxy-output in the webbrowser, e.g. the output is
http://sub.testdom.com:**4000**/SitePages/Home.aspx
and because port 4000 is not known for http by the browser, all users face a timeout problem at once.
How to fix this problem?
Many thanks in advance!
ProxyRequests Off
ProxyPreserveHost On
ProxyReceiveBufferSize 4096
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
AddDefaultCharset off
ProxyPass / http://abc:4000/
ProxyPassReverse / http://abc:4000/
<Location />
Order allow,deny
Allow from all
</Location>
</VirtualHost>