This is my config. Maybe it helps you:

fastcgi.server = (
        "/index.py" => (
                "/"=>(
                "socket" => "/tmp/webpy_one.fastcgi.socket",
                "bin-path" => "/home/fsx/webapps/lighttpd/www/index.py",
                "max-procs" => 1,
                "bin-environment" => (
                        "REAL_SCRIPT_NAME" => ""
                        ),
                "check-local" => "disable"
                ))
        )

url.rewrite-once = (
        "^/favicon.ico$" => "/static/favicon.ico",
        "^/favicon.png$" => "/static/favicon.png",
        "^/static/(.*)$" => "/static/$1",
        "^/(.*)$" => "/index.py/$1"
        )

2009/3/18 Adam <[email protected]>

> Hello there.
>
> I'm having problems getting static files to serve with lighttpd.  Accessing
> /robots.txt or any static file gives a simple textual 'Not found' error.
> However, attempting to access a static file that *really* does not exist
> results in an HTML-formatted 404 error message.  It seems that the former is
> generated by web.py and the latter by Lighttpd.  Any help would be
> appreciated.  Here's my lighttpd configuration:
>
> server.modules = (
>             "mod_access",
>             "mod_alias",
>             "mod_accesslog",
>             "mod_compress",
>             "mod_fastcgi",
>             "mod_rewrite",
> )
> $HTTP["host"] =~ "^(www\.|)example\.com" {
>     url.rewrite-once = (
>        "^/favicon.ico$" => "/static/favicon.ico",
>         "^/robots.txt$"  => "/static/robots.txt",
>        "^/static/(.*)$" => "/static/$1",
>         "^/(.*)$" => "/example.py/$1"
>     )
>    server.document-root       = "/var/www"
>     fastcgi.server = ( "/" =>
>        (( "socket" => "/tmp/fastcgi.socket",
>             "bin-path" => "/var/www/example.py",
>            "max-procs" => 1
>         ))
>    )
> }
> accesslog.filename         = "/var/log/lighttpd/access.log"
> url.access-deny            = ( "~", ".inc" )
> static-file.exclude-extensions = ( ".php", ".pl", ".fcgi", ".py" )
> server.pid-file            = "/var/run/lighttpd.pid"
> compress.cache-dir = "/var/cache/lighttpd/compress/"
> compress.filetype  = ("text/plain", "text/html",
> "application/x-javascript", "text/css", "text/javascript", "text/xml")
>
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to