#!/usr/bin/perl use lib qw( lib extras-lib ); use Sprocket qw( Client Server Plugin::HTTP::Server Plugin::HTTP::Deny Plugin::HTTP::CGI ); my %opts = ( LogLevel => 4, TimeOut => 0, # MaxConnections => 10000, ); # http server Sprocket::Server->spawn( %opts, Name => 'HTTP Server', ListenPort => 8001, ListenAddress => '0.0.0.0', Plugins => [ { Plugin => Sprocket::Plugin::HTTP::Server->new( DocumentRoot => $ENV{PWD}.'/html', ForwardList => { qr|/\.| => 'HTTP::Deny', qr/\.(pl|cgi|php)$/ => 'HTTP::CGI', } ), Priority => 0, }, { Plugin => Sprocket::Plugin::HTTP::Deny->new(), Priority => 1, }, { Plugin => Sprocket::Plugin::HTTP::CGI->new(), Priority => 2, }, ], ); $sprocket->run(); 1;