I understand that to redirect from port 80 to port 8080 I can use the Apache module mod_proxy,
I understand that I have to change "something" to be like this (example from http://httpd.apache.org/docs/2.2/mod/mod_proxy.html):
ProxyPass /foo http://foo.example.com/bar ProxyPassReverse /foo http://foo.example.com/bar
What I don't understand is how do I "edit mod_proxy". I found a file called
mod_proxy.so but it is not a text file that can be edited.
What do I have to do to make these changes, is it a text file somewhere I have to edit or some commands I have to run?
I edited httpd.conf to look like this:
LoadModule proxy_module modules/mod_proxy.so #LoadModule proxy_ajp_module modules/mod_proxy_ajp.so #LoadModule proxy_balancer_module modules/mod_proxy_balancer.so #Enabling proxy for redirection to tomcat #ProxyRequests Off #ProxyPreserverHost On <Proxy *> Order deny, allow Allow from all </Proxy> #ProxyPass / ajp://localhost:8009/ #ProxyPassReverse / ajp://localhost:8009/ <Location http://www.mywebserver.com> Order allow,deny Allow from all PassProxy / http://localhost:8080/ PassReverseProxy / http://localhost:8080 </Location>
I then tried to restart apache with
apachectl -k graceful but I got:
Syntax error on line 207 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/httpd.conf: Cannot load /etc/apache2/modules/mod_proxy.so into server: /etc/apache2/modules/mod_proxy.so: cannot open shared object file: No such file or directory Action '-k graceful' failed.
Any info on what I'm doing wrong or what I can read to get more info, would be much appreciated.