I am trying to forward a port from 80 to 8080 (default to tomcat). below is what I added to the httpd file.
<VirtualHost www.example.com:80>
ProxyPreserveHost On
ProxyRequests Off
ServerName www.example.com
ServerAlias example.com
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/
</VirtualHost>
After adding this , there are no signs of any change. Is there anything wrong with the code?
Centos 5.9
apache 2.2
tomcat 7
whm/cpanel.
UPDATE: My target domain is www.99rounds.com:80 direct to :8080
Update 2 After added the code from the answer, and removing the 2 lines of logs. I get: Note that centos has built-in mod_proxy support, if I force it : loadModule ... It will give me the error saying its built in.
apachectl -S
?www
version of the name in/usr/local/apache/conf/includes/post_virtualhost_global.conf
and the non-www version in/usr/local/apache/conf/httpd.conf
, probably withServerAlias
directives binding them to the other name -- which one of these is the one you added the configuration to?post_virtualhost_global.confGlobal
I added the below code from answer but still no forwarding.