Catalyst::Manual::Deployment::DevelopmentServer3pm
Development server deployment the development server is a mini web server written in perl. however, if you supply the "-f" option to the development server, it will load the higher performance starman server, which can be used as an application server with a lightweight proxy web server at the front.
Setup
Start up the development server
script/myapp_server.pl -p 8080 -k -f --pidfile=/tmp/myapp.pid
You will probably want to write an init script to handle stop/starting the app using the pid file.
Configuring Apache
Make sure mod_proxy is enabled and add:
# Serve static content directlyDocumentRoot /var/www/MyApp/rootAlias /static /var/www/MyApp/root/staticProxyRequests Off<Proxy *>Order deny,allowAllow from all</Proxy># Need to specifically stop these paths from being passed to proxyProxyPass /static !ProxyPass /favicon.ico !ProxyPass / http://localhost:8080/ProxyPassReverse / http://localhost:8080/# This is optional if you'd like to show a custom error page# if the proxy is not availableErrorDocument 502 /static/error_pages/http502.html
You can wrap the above within a VirtualHost container if you want different apps served on the same host.
Other web servers
The proxy configuration above can also be replicated with a different frontend server or proxy, such as varnish, nginx, or lighttpd.
Releases
7 releases since Debian 7 (Wheezy); the text changed 6 times.