[Catalyst] Catalyst in reverse proxy mode
    Andy Grundman 
    andy at hybridized.org
       
    Mon Dec 12 16:11:02 CET 2005
    
    
  
Here is a working Apache2 -> Apache1 mod_proxy setup for a Catalyst app. 
  Note that Catalyst's built-in support for proxy environments takes 
care of server and user address rewriting on the backend automatically.
Apache2
-------
<VirtualHost *>
         ServerName www.myapp.com
         ServerAlias myapp.com
         DocumentRoot /var/www/myapp.com/root
         CustomLog /var/log/apache2/myapp.com-access_log combined
         RewriteEngine on
         RewriteRule (images|static) - [last]
         RewriteRule ^/(.*)$ http://127.0.0.1:8084/$1 [proxy]
         ProxyPassReverse / http://127.0.0.1:8084/
</VirtualHost>
Apache1
-------
Listen 127.0.0.1:8084
<VirtualHost 127.0.0.1:8084>
     ServerName www.myapp.com
     DocumentRoot /var/www/myapp.com/root
     ErrorLog /var/log/apache-perl/myapp.com-error_log
     <Perl>
             use lib qw(/var/www/myapp.com/lib);
     </Perl>
     PerlModule              MyApp
     SetHandler              perl-script
     PerlHandler             MyApp
     PerlTransHandler        Apache::OK
</VirtualHost>
-Andy
    
    
More information about the Catalyst
mailing list