2006-01-19

Configure Catalyst 5.61 with Apache2 on Windows

I reconfigured my Catalyst app using mod_perl today. It was configured using CGI before as I was making a lot of changes and would like to page to always reflect the last change. The original configuration is:
<VirtualHost *:80>
ServerAdmin my@server.com
DocumentRoot c:/site/myapp/root
ServerName myserver2
ErrorLog c:/site/myapp/myapp-error.log
CustomLog c:/site/myapp/myapp-access.log common
ScriptAliasMatch ^/(.+) c:/site/myapp/script/myapp_cgi.pl/$1
Alias /static c:/site/myapp/root/static
<Location "/static">
SetHandler none
</Location>
</VirtualHost>

It works but the performance is horrorable. The new configuration is:
<VirtualHost *:80>
ServerAdmin my@server.com
DocumentRoot c:/site/myapp/root
ServerName myserver2
ErrorLog c:/site/myapp/myapp-error.log
CustomLog c:/site/myapp/myapp-access.log common
PerlOptions +Parent
PerlSwitches -IC:/site/myapp/lib
<Location />
SetHandler modperl
PerlHandler myapp
</Location>
<LocationMatch "/static">
SetHandler none
</LocationMatch>
</VirtualHost>

No comments: