Catalys...ntServer(3)
π NAME π
okay so bestie, this page is Catalyst::Manual::DevelopmentServer β Development server deployment β¨ and it lives in the User Contributed Perl Documentation (the header title is Catalys...ntServer(3), iykyk). The development server is literally a mini web server written in Perl πͺ. However, if you supply the -f option to the development server, it will load the higher performance Starman server β and that can be used as an application server with a lightweight proxy web server at the front. no cap.
π Setup π
β¨ Start up the development server β¨
Run this exact command, bestie:
script/myapp_server.pl -p 8080 -k -f --pidfile=/tmp/myapp.pid
ngl you will probably want to write an init script to handle stop/starting the app using the pid file. π«Ά
πΈ Configuring Apache πΈ
Make sure mod_proxy is enabled and add this:
# Serve static content directly
DocumentRoot /var/www/MyApp/root
Alias /static /var/www/MyApp/root/static
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
# Need to specifically stop these paths from being passed to proxy
ProxyPass /static !
ProxyPass /favicon.ico !
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/
# This is optional if you'd like to show a custom error page
# if the proxy is not available
ErrorDocument 502 /static/error_pages/http502.html
You can wrap the above within a VirtualHost container if you want different apps served on the same host. π
π¦ Other web servers π¦
The proxy configuration above can also be replicated with a different frontend server or proxy, such as varnish, nginx, or lighttpd. β¨
π 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. π
π« cute lil sign-off: this page comes from perl v5.42.0, dated 2024-03-23, and the header title is Catalys...ntServer(3) β periodt, bestie π π«Ά
π¦ 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