mod proxy not working on apache with cpanel and whm

johnmerlino

Registered
Feb 12, 2012
1
0
51
cPanel Access Level
Root Administrator
hey all,

My plight was initially tracked here:

/http://serverfault.com/questions/347078/mod-proxy-not-working-on-apache
apache2 - mod proxy not working on apache - Server Fault

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
Install Mod_Proxy Apache module on WHM/CPanel CeEntOS Linux Server Without Recompiling Apache

I loaded the following modules:

Code:
[email protected] [/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*

My virtual host 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 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

So apparently, Im doing something wrong. Is there an easier way to accomplish what I am trying to do through cPanel interface?

thanks for response