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. However, consider using
7 L<Catalyst::Engine::HTTP::Prefork> for this kind of deployment instead, since
8 it can better handle multiple concurrent requests without forking, or can
9 prefork a set number of servers for improved performance.
13 As this is an application server setup, the pros are the same as
14 FastCGI (with the exception of speed).
19 The development server is what you create your code on, so if it works
20 here, it should work in production!
26 Not as fast as mod_perl or FastCGI. Needs to fork for each request
27 that comes in - make sure static files are served by the web server to
32 =head4 Start up the development server
34 script/myapp_server.pl -p 8080 -k -f -pidfile=/tmp/myapp.pid
36 You will probably want to write an init script to handle stop/starting
37 the app using the pid file.
39 =head4 Configuring Apache
41 Make sure mod_proxy is enabled and add:
43 # Serve static content directly
44 DocumentRoot /var/www/MyApp/root
45 Alias /static /var/www/MyApp/root/static
53 # Need to specifically stop these paths from being passed to proxy
55 ProxyPass /favicon.ico !
57 ProxyPass / http://localhost:8080/
58 ProxyPassReverse / http://localhost:8080/
60 # This is optional if you'd like to show a custom error page
61 # if the proxy is not available
62 ErrorDocument 502 /static/error_pages/http502.html
64 You can wrap the above within a VirtualHost container if you want
65 different apps served on the same host.
69 Catalyst Contributors, see Catalyst.pm
73 This library is free software. You can redistribute it and/or modify it under
74 the same terms as Perl itself.