I'm having a bit of trouble setting up authentication using lighttpd
and htpasswd. I have had this working before (6 months ago) but lost
my conf file and now am having trouble getting it to work again. What
its doing is just going to url regardless of whether or not the
mod_auth is enabled. Any help/examples would be greatly appreciated.

Here is my lighttpd.conf file (lighttpd version 1.4.18):

server.modules   =
("mod_fastcgi","mod_rewrite","mod_access","mod_auth")
server.document-root = "/var/www"
server.port = 9000

auth.backend = "htpasswd"
auth.backend.htpasswd.userfile = "/etc/lighttpd.user.htpasswd"
auth.require = ( "" =>
 (
   "method"  => "basic",
   "realm"   => "Authorized Users Only",
   "require" => "valid-user"
 )
)
fastcgi.server = ( "/main.py" =>
 (( "socket" => "/tmp/fastcgi.socket",
    "bin-path" => "/var/www/main.py",
    "max-procs" => 1,
    "bin-environment" => (
           "REAL_SCRIPT_NAME" => ""
     ),
     "check-local" => "disable"

  ))
)

url.rewrite-once = (
      "^/favicon.ico$" => "/static/favicon.ico",
      "^/static/(.*)$" => "/static/$1",
      "^/logs/(.*)$" => "/logs/$1",
      "^/db/(.*)$" => "/db/$1",
      "^/csv/(.*)$" => "csv/$1",
      "^/emergency/(.*)$" => "/emergency/$1",
      "^/(.*)$" => "/main.py/$1",
)

cheers,

brendon

-- 
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