in reply to Re^2: Serving Static Content using Plack
in thread Serving Static Content using Plack

Maybe you'd like to share what you tried?

I call this server "apacheet"

#!/usr/bin/perl -- use strict; use warnings; use Plack::Builder; use Plack::Runner; use Plack::App::Directory; use Plack::App::CGIBin; my $app = builder { mount "/" => Plack::App::Directory->new({ root => 'path/to/public_html', })->to_app; mount "/cgi-bin" => Plack::App::CGIBin->new({ root => 'path/to/cgi-bin', })->to_app; }; #~ $app = builder { #~ enable 'Debug' => panels => [ qw(DBITrace Timer) ]; #~ $app; #~ }; my $runner = Plack::Runner->new; $runner->parse_options( qw' --host 127.0.0.1 --port 80 '); $runner->run($app);

See also

http://www.modernperlbooks.com/mt/2011/08/serving-a-local-directory-with-plack.html

http://advent.plackperl.org/2009/12/day-5-run-a-static-file-web-server-with-plack.html]

http://learn.perl.org/examples/static_server.html

https://metacpan.org/module/Plack::App::File::Range

http://advent.plackperl.org/2009/12/day-17-serving-static-files-from-your-application.html