durusmail: qp: Deploying qp sites on lighttpd/scgi
Deploying qp sites on lighttpd/scgi
2008-02-26
2008-02-26
2008-02-26
2008-02-26
Deploying qp sites on lighttpd/scgi
mario ruggier
2008-02-26
Hi,

am trying to configure a sub-domain on lighttpd as a scgi-deployed qp
site. It seems pretty straightforward, but there is something very
strange going on with script_name.

To illustrate, using the stock echo demo site that comes in qp 2.0, and
setting up a sub-domain echo.example.com to point to the physical box
where lighttpd is listening, and adding the following lighttpd conf (to
an otherwise default main lighttpd config):

$HTTP["host"] == "echo.example.com" {
     server.name = "echo.example.com"
     scgi.server = (
          "/" => (
             (
               "host" => "127.0.0.1",
               "port" => 11001,
               "check-local" => "disable",
               "max-procs" => 1,
             ),
         ),
     )
}

Then requesting the following URLs sets the following values:

http://echo.myfiki.com/
   'PATH_INFO': '/',
   'REQUEST_URI': '/',
   'SCRIPT_NAME': '',

http://echo.myfiki.com/xx
   'PATH_INFO': '/xx',
   'REQUEST_URI': '/xx',
   'SCRIPT_NAME': '',

http://echo.myfiki.com/xx/
   'PATH_INFO': '/',
   'REQUEST_URI': '/xx/',
   'SCRIPT_NAME': ''/xx,

http://echo.myfiki.com/xx/yy
   'PATH_INFO': '/yy',
   'REQUEST_URI': '/xx/yy',
   'SCRIPT_NAME': ''/xx,

http://echo.myfiki.com/xx/yy/
   'PATH_INFO': '/yy/',
   'REQUEST_URI': '/xx/yy/',
   'SCRIPT_NAME': ''/xx,

and so on. It seems that -- when there is more than one url component
-- the first of these is interpreted as being the script_name.

Has anyone been successfully deploying qp sites (or quixote, as I
suspect behaviour will be identical) on lighttpd+scgi? Should I be
using a different lighttpd conf, or is the sample conf above
conceptually correct? Is this variation in what is the script_name an
internal issue to qp?

Thanks for any suggestions....

mario

reply