-
-
Save RokkuCode/aee852dad37b898642e4bab24cc06ae2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Plack::Builder; | |
use Plack::App::File; | |
use CGI::Emulate::PSGI; | |
use CGI::Compile; | |
my $path_of_otrs = "/path/otrs"; | |
my $cgi_script_index = $path_of_otrs . "/bin/cgi-bin/index.pl"; | |
my $sub_index = CGI::Compile->compile($cgi_script_index); | |
my $app_index = CGI::Emulate::PSGI->handler($sub_index); | |
my $cgi_script_customer = $path_of_otrs . "/bin/cgi-bin/customer.pl"; | |
my $sub_customer = CGI::Compile->compile($cgi_script_customer); | |
my $app_customer = CGI::Emulate::PSGI->handler($sub_customer); | |
my $cgi_script_installer = $path_of_otrs . "/bin/cgi-bin/installer.pl"; | |
my $sub_installer = CGI::Compile->compile($cgi_script_installer); | |
my $app_installer = CGI::Emulate::PSGI->handler($sub_installer); | |
my $cgi_script_nph_genericinterface = $path_of_otrs . "/bin/cgi-bin/nph-genericinterface.pl"; | |
my $sub_nph_genericinterface = CGI::Compile->compile($cgi_script_nph_genericinterface); | |
my $app_nph_genericinterface = CGI::Emulate::PSGI->handler($sub_nph_genericinterface); | |
my $cgi_script_public = $path_of_otrs . "/bin/cgi-bin/public.pl"; | |
my $sub_public = CGI::Compile->compile($cgi_script_public); | |
my $app_public = CGI::Emulate::PSGI->handler($sub_public); | |
my $cgi_script_rpc = $path_of_otrs . "/bin/cgi-bin/rpc.pl"; | |
my $sub_rpc = CGI::Compile->compile($cgi_script_rpc); | |
my $app_rpc = CGI::Emulate::PSGI->handler($sub_rpc); | |
builder { | |
mount "/" => $app_index; | |
mount "/index.pl" => $app_index; | |
mount "/customer.pl" => $app_customer; | |
mount "/installer.pl" => $app_installer; | |
mount "/nph-genericinterface.pl" => $app_installer; | |
mount "/public.pl" => $app_public; | |
mount "/rpc.pl" => $app_rpc; | |
mount "/otrs-web" => Plack::App::File->new(root => $path_of_otrs . '/var/httpd/htdocs')->to_app; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment