3 Catalyst::Manual::DevelopmentServer - Development server deployment
5 The development server is a mini web server written in perl. However if
6 you supply the C<-f> option to the development server, it will load
7 the higher performance L<Starman> server, which can be used as an
8 application server with a lightweight proxy web server at the front.
12 =head2 Start up the development server
14 script/myapp_server.pl -p 8080 -k -f --pidfile=/tmp/myapp.pid
16 You will probably want to write an init script to handle stop/starting
17 the app using the pid file.
19 =head2 Configuring Apache
21 Make sure mod_proxy is enabled and add:
23 # Serve static content directly
24 DocumentRoot /var/www/MyApp/root
25 Alias /static /var/www/MyApp/root/static
33 # Need to specifically stop these paths from being passed to proxy
35 ProxyPass /favicon.ico !
37 ProxyPass / http://localhost:8080/
38 ProxyPassReverse / http://localhost:8080/
40 # This is optional if you'd like to show a custom error page
41 # if the proxy is not available
42 ErrorDocument 502 /static/error_pages/http502.html
44 You can wrap the above within a VirtualHost container if you want
45 different apps served on the same host.
47 =head2 Other web servers
49 The proxy configuration above can also be replicated with a different front end server
50 or proxy such as varnish, nginx or lighttpd.
54 Catalyst Contributors, see Catalyst.pm
58 This library is free software. You can redistribute it and/or modify it under
59 the same terms as Perl itself.