I am trying to install Mod_Proxy Apache module on WHM/CPanel CeEntOS Linux Server. Here is system info:
CentOS release 5.6 (Final)
Server version: Apache/2.2.21 (Unix)
Cpanel::Easy::Apache v3.7.2 rev9999
The purpose of me installing is so that when on site abc.com, when I click a link to site auto.efg.com (lets pretend its ip address is 192.168.0.101), the browser will load the application on auto.efg.com while mainitaing abc.com on address bar of browser.
So I followed this tutorial:
http://www.hackersgarage.com/install-mod_proxy-apache-module-on-whmcpanel-ceentos-linux-server.html
And so when I finished following it, I was able to do this:
root@ip-xxx-xxx-xxx [/tmp/httpd-2.2.21/modules/proxy]# ls -l
/usr/local/apache/modules/mod_proxy*
-rwxr-xr-x 1 root root 88708 Jan 5 08:22 /usr/local/apache/modules/mod_proxy.so*
-rwxr-xr-x 1 root root 49654 Jan 5 08:23 /usr/local/apache/modules/mod_proxy_connect.so*
-rwxr-xr-x 1 root root 73196 Jan 5 08:23 /usr/local/apache/modules/mod_proxy_http.so*
Now after I followed those instructions and tried to restart the server, I got the following error:
/etc/init.d/httpd restart
httpd: Syntax error on line 35 of /usr/local/apache/conf/httpd.conf: module proxy_module is built-in and can't be loaded
You see, that occured because I had loaded the module for proxy_module,. proxy_http_module in httpd.conf, so I commented them out in /usr/local/apache/conf/httpd.conf:
# LoadModule proxy_module modules/mod_proxy.so
# LoadModule proxy_http_module modules/mod_proxy_http.so
# LoadModule proxy_connect_module modules/mod_proxy_connect.so
Now that error went away.
And my virtual host setting looks like this:
<VirtualHost 50.63.53.79:80>
ServerName abc.com
ServerAlias www.abc.com
DocumentRoot /home/eagl0028/public_html
ServerAdmin [email protected]
## User eagl0028 # Needed for Cpanel::ApacheConf
<IfModule mod_suphp.c>
suPHP_UserGroup eagl0028 eagl0028
</IfModule>
<IfModule !mod_disable_suexec.c>
SuexecUserGroup eagl0028 eagl0028
</IfModule>
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPreserveHost On
ProxyPass / http://192.168.0.101/
ProxyPassReverse / http://192.168.0.101/
CustomLog /usr/local/apache/domlogs/abc.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
CustomLog /usr/local/apache/domlogs/abc.com combined
ScriptAlias /cgi-bin/ /home/eagl0028/public_html/cgi-bin/
</VirtualHost>
However, when I run:
service httpd stop
service httpd start
And then post to a relative url:
<form accept-charset="UTF-8" action="/users/sign_in" class="user_new" id="user_new" method="post">
Im expecting it to post to 192.168.0.101 but it doesnt. I check the 192.168.0.101 server logs and no sign of a request coming in. All that occurs is a 404 not found error with the url on top being abc.com/users/sign_in
All I notice is that when I try "apachectl stop"…
), and "What's messed up with my Apache configuration syntax?" (everything fromAll I notice
on...). Please split these up - you appear to be conflating two unrelated problems...