[Catalyst] Configuring Apache for mod_perl Catalyst and php via mod_proxy

matthew couchman (JIC) matthew.couchman at jic.ac.uk
Fri Jul 29 11:03:31 GMT 2011


Hi,

I'm currently running a couple of Catalyst applications configured as VirtualHosts in Apache. I have some php software that I'd like to serve from the same server but I've discovered that php and mod_perl don't seem to get along in the same Apache instance.

Mod_proxy looks like a good solution and I've made some progress by following http://wiki.apache.org/httpd/RunningMultipleApacheInstances. That page suggests that the proxy httpd might be configured something like this:

# httpd-proxy.conf
NameVirtualHost *:80
<VirtualHost *:80>
  DocumentRoot /www/wordpress
  ServerName blog.company.com
  ProxyPass / http://localhost:81/
  ProxyPassReverse / http://localhost:81/
  [... additional directives here ... ]
</VirtualHost>
<VirtualHost *:80>
  DocumentRoot /www/svn
  ServerName svn.company.com
  ProxyPass / http://localhost:82/
  ProxyPassReverse / http://localhost:82/
  [... additional directives here ... ]
</VirtualHost>

And the mod_perl httpd as:


# httpd-perl.conf

 Listen 81

 ErrorLog /var/log/httpd-perl-error.log

 LoadModule perl_module libexec/apache22/mod_perl.so

Which, if I am only running one host on the mod_perl server, works perfectly well. I'd like to tweak it further to redirect to the various VirtualHosts that I have been running with mod_perl alone but I'm not familiar enough with Apache to know how. Could anyone offer advice?

Thanks very much,

                                Matt.

-----------------------------------------------------------------------------------------------------
Please note, that my email address is no longer givenname.surname at bbsrc.ac.uk.  Please update your records to reflect my new email address of givenname.surname at jic.ac.uk as shown on this email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20110729/3ef2a67b/attachment.htm


More information about the Catalyst mailing list