Score:1

apache2 reverse Proxy - how to change default http Port of connected webserver

gb flag

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>
Michael Hampton avatar
cz flag
Change it back to 80 or fix the web application.
snuggs avatar
gb flag
This was helpful. Many thanks.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.