Skip to content

Instantly share code, notes, and snippets.

@wose
Created May 19, 2011 15:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wose/980959 to your computer and use it in GitHub Desktop.
Save wose/980959 to your computer and use it in GitHub Desktop.
run otrs using Plack
use Plack::App::CGIBin;
use Plack::Builder;
use HTTP::Server::PSGI;
use Plack::App::File;
use lib "D:/otrs";
use lib "D:/otrs/Kernel/cpan-lib";
my $server = HTTP::Server::PSGI->new(
host => "127.0.0.1",
port => 9091,
timeout => 120,
);
my $static = Plack::App::File->new(
{ root => "otrs/var/httpd/htdocs" }
)->to_app;
my $cgi = Plack::App::CGIBin->new(
root => "otrs/bin/cgi-bin"
)->to_app;
my $app = builder {
mount "/cgi-bin" => $cgi;
mount "/otrs-web" => $static;
};
$server->run($app);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment