Our company is hosting two websites from the AS400 using php and net.data for most of it. Lets call them CompanyA and CompanyB. CompanyB is rarely accessed but we did notice when it tries calling a php program it is actually grabbling the CompanyA version that is named the same thing.
I think the problem is with the virtualhost configuration but after digging around trying to educate myself on it I am not so sure. Any help or thoughts would be great. Below I pasted the virtualhost setup for the two companies.
I think the problem is with the virtualhost configuration but after digging around trying to educate myself on it I am not so sure. Any help or thoughts would be great. Below I pasted the virtualhost setup for the two companies.
Code:
<VirtualHost *:80> ProxyPreserveHost On RewriteEngine on RewriteCond %{REQUEST_FILENAME} ^.+\.php$ [NC] RewriteRule ^/(.*) http://127.0.0.1:8000/$1 [P] ProxyPassReverse / [url]http://127.0.0.1:8000/[/url] RewriteCond %{REQUEST_METHOD} ^TRACE RewriteRule .* - [F] ServerName [url]www.companya.com[/url] DirectoryIndex index.htm DocumentRoot /www/webserver/websites/coma ServerAlias coma.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 / [url]http://127.0.0.1:8000/[/url] RewriteCond %{REQUEST_METHOD} ^TRACE RewriteRule .* - [F] ServerName [url]www.companyb.com[/url] DirectoryIndex Welcome.htm DocumentRoot /www/webserver/websites/comb ServerAlias comb.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>
Comment