a two-tiered setup, the frontend server should handle static files.
The configuration to do this on the frontend will vary.
+The same is accomplished in lighttpd with the following snippet:
+
+ $HTTP["url"] !~ "^/(?:img/|static/|css/|favicon.ico$)" {
+ fastcgi.server = (
+ "" => (
+ "MyApp" => (
+ "socket" => "/tmp/myapp.socket",
+ "check-local" => "disable",
+ )
+ )
+ )
+ }
+
+Which serves everything in the img, static, css directories
+statically, as well as the favicon file.
+
+Note the path of the application needs to be stated explicitly in the
+web server configuration for both these recipes.
+
=head2 Catalyst on shared hosting
So, you want to put your Catalyst app out there for the whole world to
Alias /_errors /var/www/MyApp/root/error-pages
ErrorDocument 502 /_errors/502.html
- FastCgiExternalServer /tmp/myapp -socket /tmp/myapp.socket
- Alias /myapp/ /tmp/myapp/
+ FastCgiExternalServer /tmp/myapp.fcgi -socket /tmp/myapp.socket
+ Alias /myapp/ /tmp/myapp.fcgi/
# Or, run at the root
- Alias / /tmp/myapp/
+ Alias / /tmp/myapp.fcgi/
=head3 More Info
The development server is a mini web server written in perl. If you
expect a low number of hits or you don't need mod_perl/FastCGI speed,
you could use the development server as the application server with a
-lightweight proxy web server at the front. However, be aware that
-there are known issues, especially with Internet Explorer. Many of
-these issues can be dealt with by running the server with the -k
-(keepalive) option but be aware for more complex applications this may
-not be suitable. Consider using Catalyst::Engine::HTTP::POE. This
-recipe is easily adapted for POE as well.
+lightweight proxy web server at the front. However, consider using
+L<Catalyst::Engine::HTTP::POE> for this kind of deployment instead, since
+it can better handle multiple concurrent requests without forking, or can
+prefork a set number of servers for improved performance.
=head3 Pros
=head4 Start up the development server
- script/myapp_server.pl -p 8080 -k -f -pidfile=/tmp/myapp.pid -daemon
+ script/myapp_server.pl -p 8080 -k -f -pidfile=/tmp/myapp.pid
You will probably want to write an init script to handle stop/starting
the app using the pid file.