Rip the stuff out of Engine::FastCGI in master
[catagits/Catalyst-Manual.git] / lib / Catalyst / Manual / Deployment / lighttpd / FastCGI.pod
CommitLineData
1d2376f3 1=head1 NAME
2
3Catalyst::Manual::Deployment::lighttpd::FastCGI - Deploying Catalyst with lighttpd
4
45b58a85 5=head2 Lighttpd
6
7These configurations were tested with Lighttpd 1.4.7.
8
9=head3 Standalone server mode
10
11 server.document-root = "/var/www/MyApp/root"
12
13 fastcgi.server = (
14 "" => (
15 "MyApp" => (
16 "socket" => "/tmp/myapp.socket",
17 "check-local" => "disable"
18 )
19 )
20 )
21
22=head3 Static mode
23
24 server.document-root = "/var/www/MyApp/root"
25
26 fastcgi.server = (
27 "" => (
28 "MyApp" => (
29 "socket" => "/tmp/myapp.socket",
30 "check-local" => "disable",
31 "bin-path" => "/var/www/MyApp/script/myapp_fastcgi.pl",
32 "min-procs" => 2,
33 "max-procs" => 5,
34 "idle-timeout" => 20
35 )
36 )
37 )
38
39Note that in newer versions of lighttpd, the min-procs and idle-timeout
40values are disabled. The above example would start 5 processes.
41
42=head3 Non-root configuration
43
44You can also run your application at any non-root location with either of the
45above modes. Note the required mod_rewrite rule.
46
47 url.rewrite = ( "myapp\$" => "myapp/" )
48 fastcgi.server = (
49 "/myapp" => (
50 "MyApp" => (
51 # same as above
52 )
53 )
54 )
55
56For more information on using FastCGI under Lighttpd, visit
57L<http://www.lighttpd.net/documentation/fastcgi.html>
58
59
1d2376f3 60=head4 Static file handling
61
62Static files can be served directly by lighttpd for a performance boost.
63
64 $HTTP["url"] !~ "^/(?:img/|static/|css/|favicon.ico$)" {
65 fastcgi.server = (
66 "" => (
67 "MyApp" => (
68 "socket" => "/tmp/myapp.socket",
69 "check-local" => "disable",
70 )
71 )
72 )
73 }
74
75Which serves everything in the img, static, css directories
76statically, as well as the favicon file.
77
45b58a85 78=head1 AUTHORS
79
80Catalyst Contributors, see Catalyst.pm
81
82=head1 COPYRIGHT
83
84This library is free software. You can redistribute it and/or modify it under
85the same terms as Perl itself.
86
87=cut