View Full Version : Multiple Virtual Hosts with Apache

03-16-2010, 09:27 AM

I am trying to use Apache Httpd as a dispatcher fronting multiple Resin instances. Each Resin instance should host multiple applications using virtual hosting. Setting up Resin with virtual hosting works (by testing directly on its http port), but when I use Apache as a dispatcher, I can't get it working. I can get Apache to dispatch to Resins ROOT application, but not to virtual hosts. The Caucho-status page does not show the virtual hosts defined on the Resin servers - only the default virtual host.

Any suggestions?

httpd.conf (Apache 2.2)
LoadModule caucho_module "D:/Resin/resin-3.1.9/win32/apache-2.2/mod_caucho.dll"

NameVirtualHost *:80

<VirtualHost *:80>
ServerName dokuwiki.jysk.com
ResinConfigServer 6800

resin.conf (Resin 3.1.9):

<resin xmlns="http://caucho.com/ns/resin"

<log name="" level="info" path="stdout:"/>

<cluster id="">
<server id="" port="6800">
<http port="8080"/>

<resin:import path="${resin.home}/conf/app-default.xml"/>

<host id="dokuwiki.jysk.com" root-directory="vhosts/dokuwiki">
<web-app id="/" root-directory="webapps/ROOT"/>

03-18-2010, 01:23 PM
I still can't get it to work using mod_caucho, but mod_proxy fits my needs though.

Problem solved by using this configuration:

<VirtualHost *:80>
ServerName dokuwiki.jysk.com
ProxyPreserveHost On
ProxyPass / http://localhost:8002/
ProxyPassReverse / http://localhost:8002/