Go Back   CodingForums.com > :: Server side development > Apache configuration

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-20-2012, 05:43 PM   PM User | #1
ronhextall
New to the CF scene

 
Join Date: Mar 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
ronhextall is an unknown quantity at this point
VirtualHost issue, I think...

Company is hosting two websites I will call them companyA and companyB. companyB website is rarely used but I notice when it calls a php program it is actually grabbing the companyA version of the php program instead of its own. I assume there is a problem with the configuration of the virtual hosts specifically the rewriterule(s) but I am not finding it.

Below I have pasted the configuration sections that I think is causing the problem. Any help or pointers would be great. This is running on an AS400.

<VirtualHost *:80>
ProxyPreserveHost On
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} ^.+\.php$ [NC]
RewriteRule ^/(.*) http://127.0.0.1:8000/$1 [P]
ProxyPassReverse / http://127.0.0.1:8000/
RewriteCond %{REQUEST_METHOD} ^TRACE
RewriteRule .* - [F]
ServerName www.companya.com
DirectoryIndex index.htm
DocumentRoot /www/webserver/websites/coma
ServerAlias companya.com *.companya.com
UserDir public_html
<Directory /www/webserver/websites/coma>
Order Allow,Deny
Allow From all
</Directory>
<Directory /qsys.lib/netdata.lib>
Allow From all
Order allow,deny
Options +ExecCGI
</Directory>
ScriptAlias /cgi-bin/db2www/ /qsys.lib/netdata.lib/db2www.pgm/
Alias /ifs/ /www/webserver/websites/coma/

</VirtualHost>
<VirtualHost *:80>
ProxyPreserveHost On
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} ^.+\.php$ [NC]
RewriteRule ^/(.*) http://127.0.0.1:8000/$1 [P]
ProxyPassReverse / http://127.0.0.1:8000/
RewriteCond %{REQUEST_METHOD} ^TRACE
RewriteRule .* - [F]
ServerName www.companyb.com
DirectoryIndex Welcome.htm
DocumentRoot /www/webserver/websites/comb
ServerAlias companyb.com *.companyb.com
UserDir public_html
<Directory /www/webserver/websites/comb>
Order Allow,Deny
Allow From all
</Directory>
<Directory /qsys.lib/combdata.lib>
Allow From all
Order allow,deny
Options +ExecCGI
</Directory>
ScriptAlias /cgi-bin/db2www/ /qsys.lib/combdata.lib/db2www.pgm/
Alias /ifs/ /www/webserver/websites/comb/


</VirtualHost>
ronhextall is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:10 PM.


Advertisement
Log in to turn off these ads.