Perlba...Server(3pm)
π Perlbal::Manual::WebServer π
okay bestie, so this is the manual page for Perlbal::Manual::WebServer β it lives in the User Contributed Perl Documentation section of the manual (section 3pm, for the record), and it's literally all about configuring Perlbal as a Web Server. buckle up π
β¨ VERSION β¨
Perlbal 1.78. that's the one we're talking about here. π
πΈ DESCRIPTION πΈ
The whole point of this page: how to configure a Perlbal Web Server service. that's it, that's the vibe. π¦
π READ ME FIRST π
no fr, read this first: go read Perlbal::Manual::Configuration before you read this one. this doc will make so much more sense after you've read that. i'm not being dramatic, it's just true. π
π§ Configuring Perlbal as a Web Server π§
so by default, perlbal goes looking for a config file at /etc/perlbal/perlbal.conf. that's just where it expects you to keep your stuff. π
but!! you can also point perlbal at a different config file using the -c flag, like:
$ perlbal -c /home/user/perlbal.conf
now here's a super simple example where we set up a lil web server that serves an index file under /tmp:
CREATE SERVICE perlbal_test
SET role = web_server
SET listen = 0.0.0.0:80
SET docroot = /tmp
ENABLE perlbal_test
so what's happening here:
- the first line creates a service called
perlbal_test - the last line enables that service (no enable = no service, bestie)
and the three parameters in the middle say β in order β that this service is a web server, that it listens on all addresses on port 80, and that its document root is /tmp. iconic. π₯
π Parameters π
you can set parameters with commands in either of these two forms:
SET <service-name> <param> = <value>
SET <param> = <value>
now let's meet the whole cast π«Ά
dirindexing = boolβ shows directory indexes when an HTTP request is for a directory.
β οΈ warning bestie: this is not an async operation, so it will slow Perlbal down on heavily loaded sites. be careful out there. π
Default is false.
docroot = directory/rootβ the directory root for the web server. that's where your files live, periodt.enable_concatenate_get = boolβ turns on Perlbal's multiple-files-in-one-request mode, where a client can use a comma-separated list of files to return, always intext/plain.
this is so useful for web apps that have dozens/hundreds of tiny css/js files, and don't trust browsers/etc to do pipelining. π
it decreases overall round-trip latency a bunch, but it requires the app to be modified to support it. see the t/17-concat.t test for details.
Default is false.
enable_md5 = boolβ enables verification of theContent-MD5header in HTTP PUT requests.
Default is true.
enable_delete = boolβ enables HTTP DELETE requests.
Default is false.
enable_put = boolβ enables HTTP PUT requests.
Default is false.
index_files = comma-separated list of filenamesβ a comma-separated list of filenames to load when a user visits a directory URL, listed in order of preference. first one wins, basically. π
Default is index.html.
max_put_size = sizeβ the maximum content-length that will be accepted for a PUT request, ifenable_putis on.
Default is 0, which means there is no limit. (zero = infinite vibes, iykyk)
min_put_directory = intβ if PUT requests are enabled, require this many levels of directories to already exist. if not, fail. no shortcuts. π
Default is 0.
server_tokens = boolβ whether to provide aServerheader.
Perlbal by default adds a header to all replies (such as the web_server role). by setting this default to "off", you can prevent Perlbal from identifying itself. stealth mode. π
Default is "on".
β SEE ALSO β
Perlbal::Manual::ConfigurationPerlbal::Manual::Management
and that's the whole page, bestie π this was Perlbal 1.78, documented under perl v5.34.0 and dated 2022-06-28 β go forth and serve some files, you absolute main character πβ¨
π¦ where this page comes from
- debian bookworm: libperlbal-perl 1.80-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libperlbal-perl 1.80-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libperlbal-perl 1.80-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu questing: libperlbal-perl 1.80-4
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms