Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

updating cgi and fcgi dispatch handlers

  • Loading branch information...
commit c2885169d51508785a205555284bda1936d7ce39 1 parent 8c0a749
Sawyer X xsawyerx authored

Showing 2 changed files with 21 additions and 5 deletions. Show diff stats Hide diff stats

  1. +10 2 public/dispatch.cgi
  2. +11 3 public/dispatch.fcgi
12 public/dispatch.cgi
... ... @@ -1,5 +1,13 @@
1 1 #!/usr/bin/env perl
2   -use Plack::Runner;
3 2 use Dancer ':syntax';
4   -my $psgi = path(dirname(__FILE__), '..', 'PEG.pl');
  3 +use FindBin '$RealBin';
  4 +use Plack::Runner;
  5 +
  6 +# For some reason Apache SetEnv directives dont propagate
  7 +# correctly to the dispatchers, so forcing PSGI and env here
  8 +# is safer.
  9 +set apphandler => 'PSGI';
  10 +set environment => 'production';
  11 +
  12 +my $psgi = path($RealBin, '..', 'bin', 'app.pl');
5 13 Plack::Runner->run($psgi);
14 public/dispatch.fcgi
... ... @@ -1,8 +1,16 @@
1 1 #!/usr/bin/env perl
2   -use Plack::Handler::FCGI;
3 2 use Dancer ':syntax';
  3 +use FindBin '$RealBin';
  4 +use Plack::Handler::FCGI;
4 5
5   -my $psgi = path(dirname(__FILE__), '..', 'PEG.pl');
  6 +# For some reason Apache SetEnv directives dont propagate
  7 +# correctly to the dispatchers, so forcing PSGI and env here
  8 +# is safer.
  9 +set apphandler => 'PSGI';
  10 +set environment => 'production';
  11 +
  12 +my $psgi = path($RealBin, '..', 'bin', 'app.pl');
6 13 my $app = do($psgi);
7   -my $server = Plack::Handler::FCGI->new(nproc => 5, detach => 1);
  14 +my $server = Plack::Handler::FCGI->new(nproc => 5, detach => 1);
  15 +
8 16 $server->run($app);

0 comments on commit c288516

Please sign in to comment.
Something went wrong with that request. Please try again.