t0m,

I'm very happy if you "fix this transparently"!!!
Following are some information.
Indeed  there is nothing special. Just follow two manuals.
 - Catalyst::Manual::Tutorial::02_CatalystBasics
 - Catalyst::Manual::Deployment::lighttpd::FastCGI

perl and lighttpd are package of Ubuntu11.10.

Thank you in advance.
N.A.



$ catalyst.pl Hello
$ cat /etc/lighttpd/conf-enabled/20-test.conf
fastcgi.server  += (
        "/Hello" => (
            "Hello" => (
                "bin-path" => "/test/Hello/script/hello_fastcgi.pl",
                "socket" => "/tmp/hello.socket",
                "check-local"  => "disable",
                "min-procs"    => 2,
                "max-procs"    => 5,
                "idle-timeout" => 20
            )
        )
    )
$ GET -e http://localhost/Hello/
404 Not Found
Connection: close
Date: Sun, 30 Oct 2011 11:16:39 GMT
Server: lighttpd/1.4.28
Content-Length: 14
Content-Type: text/html; charset=utf-8
Client-Date: Sun, 30 Oct 2011 11:16:39 GMT
Client-Peer: 127.0.0.1:80
Client-Response-Num: 1
X-Catalyst: 5.90006

Page not found
----



- using_request_uri_for_path => 1
 Adding suggested setting to '__PACKAGE__->config('
 makes no changes.


- contents of "$env"
before LighttpdScriptNameFix
$VAR1 = {
  'psgi.multiprocess' => 1,
  'SCRIPT_NAME' => '/Hello',
  'PATH_INFO' => '/',
  'REQUEST_METHOD' => 'GET',
  'psgi.multithread' => '',
  'SCRIPT_FILENAME' => '/var/www/Hello',
  'SERVER_SOFTWARE' => 'lighttpd/1.4.28',
  'HTTP_TE' => 'deflate,gzip;q=0.3',
  'REMOTE_PORT' => '39990',
  'QUERY_STRING' => '',
  'HTTP_USER_AGENT' => 'lwp-request/6.00 libwww-perl/6.03',
  'FCGI_ROLE' => 'RESPONDER',
  'psgi.streaming' => 1,
  'GATEWAY_INTERFACE' => 'CGI/1.1',
  'psgi.version' => [
    1,
    1
  ],
  'DOCUMENT_ROOT' => '/var/www',
  'psgi.run_once' => '',
  'PATH_TRANSLATED' => '/var/www/',
  'SERVER_NAME' => 'localhost',
  'HTTP_CONNECTION' => 'TE, close',
  'SERVER_PORT' => '80',
  'REDIRECT_STATUS' => '200',
  'REMOTE_ADDR' => '127.0.0.1',
  'SERVER_PROTOCOL' => 'HTTP/1.1',
  'REQUEST_URI' => '/Hello/',
  'psgi.errors' => *::STDERR,
  'psgi.nonblocking' => '',
  'SERVER_ADDR' => '127.0.0.1',
  'psgi.url_scheme' => 'http',
  'psgix.harakiri' => '',
  'HTTP_HOST' => 'localhost',
  'psgi.input' => *::STDIN
};
after LighttpdScriptNameFix
 ...
  'PATH_INFO' => '/Hello/',
  'SCRIPT_NAME' => '',
 ...


Some version information:

$ lsb_release -a
Distributor ID: Ubuntu
Description:    Ubuntu 11.10
Release:        11.10
Codename:       oneiric

$ perl -v

This is perl 5, version 12, subversion 4 (v5.12.4) built for x86_64-linux-gnu-thread-multi
(with 45 registered patches, see perl -V for more detail)


$ whichpm Plack
/usr/local/share/perl/5.12.4/Plack.pm 0.9984

$ whichpm Catalyst
/usr/local/share/perl/5.12.4/Catalyst.pm 5.90006

$ lighttpd -v
lighttpd/1.4.28 (ssl) - a light and fast webserver
Build-Date: Aug 20 2011 20:31:21


(10/30/11 18:52), Tomas Doran wrote:

On 29 Oct 2011, at 23:49, N.A. wrote:

Sorry for late replay.

My problem was about "Non-root configuration” of lighttpd::FastCGI.
I use lighttpd/1.4.28, which is newer than the target version of
LighttpdScriptNameFix.
With this combination, $env->{PATH_INFO} is wrong when
catalyst-application
located on non root path.

According to advices from you and Michele, now I learned
workaround.(i.e. myappp.psgi)

Alternatively, does adding the using_request_uri_for_path => 1 setting
get this to work for you?

Would you be able to supply some info about your environment in the
cases we get it wrong? (I'd like to see if it's possible to fix this
transparently - so that it just works for everyone)..

The tests for most of these conditions already are in:

t/aggregate/unit_core_engine-prepare_path.t

adding some tests here to show what happens in lighty with and without
the middleware would be extremely helpful.. (Or giving me enough data
about what goes wrong so that I could add some).

Thanks in advance.
Cheers
t0m


_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/



_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to