Catalys...:FastCGI(3)
π NAME π
hiii bestie π welcome to the Catalys...:FastCGI(3) page from User Contributed Perl Documentation β itβs the Catalyst::Manual::Deployment::lighttpd::FastCGI manual, and itβs all about deploying Catalyst with lighttpd. Thatβs the vibe: get your Catalyst app living its best life under lighttpd, periodt. β¨
π¦ Lighttpd π¦
These configurations were tested with Lighttpd 1.4.7 β thatβs the version they were tested against, no cap. π«Ά
β¨ Standalone server mode β¨
okay so for standalone server mode, drop this in:
server.document-root = "/var/www/MyApp/root"
fastcgi.server = (
"" => (
"MyApp" => (
"socket" => "/tmp/myapp.socket",
"check-local" => "disable"
)
)
)
πΈ Static mode πΈ
for static mode, itβs this configuration:
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
)
)
)
β οΈ Real talk: note that in newer versions of lighttpd, themin-procsandidle-timeoutvalues are disabled. The above example would start 5 processes. fr fr.
π Non-root configuration π
You can also run your application at any non-root location with either of the above modes, bestie. Just 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 β go read the docs, iykyk. π
π¦ Static file handling π¦
Static files can be served directly by lighttpd for a performance boost β literally a glow-up for your setup. β
$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. iconic behavior, honestly. π
π AUTHORS π
Catalyst Contributors, see Catalyst.pm
π COPYRIGHT π
This library is free software. You can redistribute it and/or modify it under the same terms as Perl itself.
kisses bestie π this page came from perl v5.42.0, dated 2024-03-23, and itβs the Catalys...:FastCGI(3) manual β bye, slay your deployment πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-Catalyst-Manual 5.9013-bp160.1.11 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms