logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Catalyst::Manual::Deployment::lighttpd::FastCGI - Deploying Catalyst with lighttpd

Authors

       Catalyst Contributors, see Catalyst.pm

Lighttpd

       These configurations were tested with Lighttpd 1.4.7.

   Standaloneservermode
           server.document-root = "/var/www/MyApp/root"

           fastcgi.server = (
               "" => (
                   "MyApp" => (
                       "socket"      => "/tmp/myapp.socket",
                       "check-local" => "disable"
                   )
               )
           )

   Staticmode
           server.document-root = "/var/www/MyApp/root"

           fastcgi.server = (
               "" => (
                   "MyApp" => (
                       "socket"       => "/tmp/myapp.socket",
                       "check-local"  => "disable",
                       "bin-path"     => "/var/www/MyApp/script/myapp_fastcgi.pl",
                       "min-procs"    => 2,
                       "max-procs"    => 5,
                       "idle-timeout" => 20
                   )
               )
           )

       Note that in newer versions of lighttpd, the min-procs and idle-timeout values are disabled.  The above
       example would start 5 processes.

   Non-rootconfiguration
       You can also run your application at any non-root location with either of the above modes.  Note the
       required mod_rewrite rule.

           url.rewrite = ( "myapp\$" => "myapp/" )
           fastcgi.server = (
               "/myapp" => (
                   "MyApp" => (
                       # same as above
                   )
               )
           )

       For more information on using FastCGI under Lighttpd, visit
       <https://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModFastCGI>

   Staticfilehandling
       Static files can be served directly by lighttpd for a performance boost.

          $HTTP["url"] !~ "^/(?:img/|static/|css/|favicon.ico$)" {
                fastcgi.server = (
                    "" => (
                        "MyApp" => (
                            "socket"       => "/tmp/myapp.socket",
                            "check-local"  => "disable",
                        )
                    )
                )
           }

       This will serve everything in the "img", "static", and "css" directories statically, as well as the
       favicon file.

Name

       Catalyst::Manual::Deployment::lighttpd::FastCGI - Deploying Catalyst with lighttpd

See Also