1 =head2 Development server deployment
3 The development server is a mini web server written in perl. If you
4 expect a low number of hits or you don't need mod_perl/FastCGI speed,
5 you could use the development server as the application server with a
6 lightweight proxy web server at the front.
14 The development server is what you create your code on, so if it works
15 here, it should work in production!
21 Not as fast as mod_perl or FastCGI. Needs to fork for each request
22 that comes in - make sure static files are served by the web server to
27 =head4 Start up the development server
29 script/myapp_server.pl -p 8080 -k -f -pidfile=/tmp/myapp.pid
31 You will probably want to write an init script to handle stop/starting
32 the app using the pid file.
34 =head4 Configuring Apache
36 Make sure mod_proxy is enabled and add:
38 # Serve static content directly
39 DocumentRoot /var/www/MyApp/root
40 Alias /static /var/www/MyApp/root/static
48 # Need to specifically stop these paths from being passed to proxy
50 ProxyPass /favicon.ico !
52 ProxyPass / http://localhost:8080/
53 ProxyPassReverse / http://localhost:8080/
55 # This is optional if you'd like to show a custom error page
56 # if the proxy is not available
57 ErrorDocument 502 /static/error_pages/http502.html
59 You can wrap the above within a VirtualHost container if you want
60 different apps served on the same host.
64 Catalyst Contributors, see Catalyst.pm
68 This library is free software. You can redistribute it and/or modify it under
69 the same terms as Perl itself.