16 December 2011

Deploying Catalyst with Starman and Apache

Topics: Web Servers, Perl
Tags: catalyst

Article Published in 2011 Catalyst Advent Calendar.

This article was published on December 16, 2011 as part of the Catalyst Advent Calendar. If you’re not familiar with this resource I highly recommend it as a great source of useful articles on the Catalyst MVC Framework.

Click here to read the article

Errata

  • Github Link. There is a link to the TestApp in the article which is wrong. Either get the Controller from the entry on this blog or https://github.com/brainbuz/Catalyst-Debugging-Controller.
  • NameVirtualHost *:80 is mistyped.
  • The Catalyst Config Directive for the proxy is using_frontend_proxy 1, if you copy and paste you will get the underscores but they are invisible when you read the screen.
  • NameVirtualHost is deprecated in Apache 2.4. It is no longer needed.
  • If you are locating your proxied catalyst application at a non-root location you’ll  need to add a base value into myapp.conf file.
  • If you are changing ports (one of the many reasons to hide starman behind apache is for apache to provide ssl) you’ll need to add these immediately prior to the rewrite rule: RequestHeader set X-Forwarded-Port 443 RequestHeader set X-Forwarded-Path     %{REQUEST_URI}s
  • Upstart currently does not support setuid, although the version in development for Precise Pangolin will have that option. To run your starman job as the ubuntu apache user: exec sudo -u www-data …..