John,

Here is what I have placed in the file /etc/lighttpd/lighttpd.conf

$

fastcgi.server = (
   "/handler_web2py.fcgi" => (
      "handler_web2py" => ( #name for logs
        "check-local" => "disable",
        "socket" => "/tmp/fcgi.sock",
      )
   )
)



$HTTP["host"] == "100.101.102.103" {
 server.document-root="/home/james/web2py"
    url.rewrite-once = (
      "^(/.+?/static/.+)$" => "/applications$1",
      "(^|/.*)$" => "/handler_web2py.fcgi$1",
    )
}


Can you tell me what I am doing wrong?


On Feb 18, 6:46 pm, John Heenan <johnmhee...@gmail.com> wrote:
> Hi Raven
>
> The name fcgihandler.py is just the name of a web2py start up file
> passed to Python.
>
> The name fcgihandler.py should not or need not appear anywhere in the
> lightttpd.conf file, since there is no need to give lighttpd the
> responsibility to start up web2py as an independent process.
>
> What lighttpd needs to know is where the UNIX socket is that is
> configured for use by web2py in fcgihandler.py. The name that
> ligthttpd.conf uses to tell the rest of lighttpd.conf to use the UNIX
> soscket is an arbitrary name. The suffix .fcgi does not need to appear
> anywhere in lighttpd.conf, it is just a convention.
>
> Maybe I should provide a link to a complete lighttpd.conf file 
> inhttp://www.web2pyslices.com/main/slices/take_slice/57
>
> It might be difficult to escape from an attitude that web servers are
> essentially used as dumb pipes by Python frameworks and as such need
> to stay 'out of the way' with minimal involvement.
>
> John Heenan
>
> On Feb 19, 5:10 am, raven <ravenspo...@yahoo.com> wrote:
>
> > Well, I gave this a try, and ended up with 404 errors.
>
> > fcgihandler.py suggests adding to lighttpd.conf
>
> > server.error-handler-404 = '/test.fcgi'
>
> > This does not help, nor does
>
> > server.error-handler-404 = "/error-handler.fcgi"
>
> > ( There no files on my system named *.fcgi, so I do not see how this
> > could help )
>
> > I suspect my problem might be with this line
>
> > $HTTP["host"] =~ "(^|\.)example\.com$" {
>
> > Since I am running on a VPS I only have an IP address.
>
> > I tried
>
> > $HTTP["host"] == "100.101.102.103" {
>
> > and
>
> > $HTTP["remoteip"] == "100.101.102.103" {
>
> > and
>
> > #SERVER["socket"] == "100.101.102.103" {
>
> > and some other variations on this, but nothing helps.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.

Reply via email to