X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FEngine%2FFastCGI.pm;h=4ff269e1abca3d30f7e7ec3388904ad0e9b1a1f3;hb=84528885db9fca49c55d5859e275b70ec1a3ea28;hp=f17178f4bf3ba47f996aa0c309d3b3dfb6a37448;hpb=198b0efa0739da9df2e79ac23ea80b63aa651db8;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Engine/FastCGI.pm b/lib/Catalyst/Engine/FastCGI.pm index f17178f..4ff269e 100644 --- a/lib/Catalyst/Engine/FastCGI.pm +++ b/lib/Catalyst/Engine/FastCGI.pm @@ -61,9 +61,11 @@ sub run { } $options ||= {}; + + my %env; my $request = - FCGI::Request( \*STDIN, \*STDOUT, \*STDERR, \%ENV, $sock, + FCGI::Request( \*STDIN, \*STDOUT, \*STDERR, \%env, $sock, ( $options->{nointr} ? 0 : &FCGI::FAIL_ACCEPT_ON_INTR ), ); @@ -78,7 +80,7 @@ sub run { while ( $request->Accept >= 0 ) { $proc_manager && $proc_manager->pm_pre_dispatch(); - $class->handle_request; + $class->handle_request( env => \%env ); $proc_manager && $proc_manager->pm_pre_dispatch(); } } @@ -155,7 +157,17 @@ This configuration was tested with Lighttpd 1.4.7. ) ) -Or use an external server: +You can also run your application at any non-root location. + + fastcgi.server = ( + "/myapp" => ( + "MyApp" => ( + # same as above + ) + ) + ) + +You can also use an external server: # Start the external server (requires FCGI::ProcManager) $ script/myapp_fastcgi.pl -l /tmp/myapp.socket -n 5