https://issues.apache.org/bugzilla/show_bug.cgi?id=51742
Bug #: 51742
Summary: Multiple virtual hosts with mod_proxy don't work
without DocumentRoot
Product: Apache httpd-2
Version: 2.2.19
Platform: PC
OS/Version: Windows Server 2003
Status: NEW
Severity: minor
Priority: P2
Component: mod_proxy
AssignedTo: [email protected]
ReportedBy: [email protected]
Classification: Unclassified
I have two different virtual hosts defined. Both doing nothing but proxying to
separate tomcat instances. With the following configuration, I found that all
requests to confluence.example.com were being handled by the jira.example.com
virtual host. That is, all requests to http://confluence.example.com/ were
logged to logs/jira/access.log and handled by the application server on port
8080:
NameVirtualHost *:80
<VirtualHost *:80>
ServerName jira.example.com
ServerAlias jira
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyRequests Off
ProxyPreserveHost On
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/
ErrorLog logs/jira/error.log
CustomLog logs/jira/access.log combined
</VirtualHost>
<VirtualHost *:80>
ServerName confluence.example.com
ServerAlias confluence
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyRequests Off
ProxyPreserveHost On
ProxyPass / http://localhost:8081/
ProxyPassReverse / http://localhost:8081/
ErrorLog logs/confluence/error.log
CustomLog logs/confluence/access.log combined
</VirtualHost>
While testing, I found that adding a DocumentRoot to the confluence virtual
host (copied/pasted the default DocumentRoot from httpd.conf) resulted in both
virtual hosts working as expected.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]