0

I've looked at quite a few posts on this site that have helped me with configuring a VirtualHost in apache to reverse proxy incoming host headers to the proper internal web server.

Yet, when I change the settings in the file httpd-vhosts.conf, it takes hours, sometimes days for it to actually show the change. Obviously it makes testing impossible. For example, this is working:

<VirtualHost *:*>
ProxyRequests On
ProxyPreserveHost On
ServerName www.mydomain.com
ProxyPass / http://192.168.1.211
ProxyPassReverse / http://192.168.1.211
</VirtualHost>

but if I change it to this:

<VirtualHost *:*>
ProxyRequests On
ProxyPreserveHost On
ServerName www.mydomainthatdoesnotexist.com
ProxyPass / http://192.168.1.211
ProxyPassReverse / http://192.168.1.211
</VirtualHost>

It still goes uses www.mydomain.com.

To try and get apache to re-read the changes, I ran httpd -k restart and httpd -k stop/httpd -k start, but they don't have any effect. Only after a few hours does the change ACTUALLY happen.

Even if I change the IP in the Virtualhost block, it still goes to 192.168.1.211:

<VirtualHost *:*>
ProxyRequests On
ProxyPreserveHost On
ServerName www.mydomain.com
ProxyPass / http://192.168.1.212
ProxyPassReverse / http://192.168.1.212
</VirtualHost>

What command will make the apache config reflect those changes? It seems something is getting cached?

JeffR
  • 113
  • 5
  • For starters in a reverse proxy **you never ever need to set [`ProxyRequests On`](https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#proxyrequests)** , especially when you don't add any security. - Open proxy servers are dangerous both to your network and to the Internet at large. - Please fix that As Soon As Possible. – HBruijn Jan 31 '19 at 15:18
  • Thank you for that and the link explaining it! Do you know about the other issue I'm facing? – JeffR Jan 31 '19 at 16:12

0 Answers0