Fix FIXMEs
[catagits/Catalyst-Manual.git] / lib / Catalyst / Manual / Deployment / DevelopmentServer.pod
CommitLineData
eaeeb5e6 1=head1 NAME
c34dd09b 2
eaeeb5e6 3Catalyst::Manual::DevelopmentServer - Development server deployment
c34dd09b 4
eaeeb5e6 5The development server is a mini web server written in perl. However if
6you supply the C<-f> option to the development server, it will load
7the higher performance L<Starman> server, which can be used as an
8application server with a lightweight proxy web server at the front.
c34dd09b 9
eaeeb5e6 10=head1 Setup
c34dd09b 11
eaeeb5e6 12=head2 Start up the development server
c34dd09b 13
eaeeb5e6 14 script/myapp_server.pl -p 8080 -k -f --pidfile=/tmp/myapp.pid
c34dd09b 15
16You will probably want to write an init script to handle stop/starting
17the app using the pid file.
18
eaeeb5e6 19=head2 Configuring Apache
c34dd09b 20
21Make sure mod_proxy is enabled and add:
22
23 # Serve static content directly
24 DocumentRoot /var/www/MyApp/root
25 Alias /static /var/www/MyApp/root/static
26
27 ProxyRequests Off
28 <Proxy *>
29 Order deny,allow
30 Allow from all
31 </Proxy>
32
33 # Need to specifically stop these paths from being passed to proxy
34 ProxyPass /static !
35 ProxyPass /favicon.ico !
36
37 ProxyPass / http://localhost:8080/
38 ProxyPassReverse / http://localhost:8080/
39
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
43
44You can wrap the above within a VirtualHost container if you want
45different apps served on the same host.
46
eaeeb5e6 47=head2 Other web servers
48
49The proxy configuration above can also be replicated with a different front end server
50or proxy such as varnish, nginx or lighttpd.
51
c34dd09b 52=head1 AUTHORS
53
54Catalyst Contributors, see Catalyst.pm
55
56=head1 COPYRIGHT
57
58This library is free software. You can redistribute it and/or modify it under
59the same terms as Perl itself.
60
61=cut