9 messages in ru.sysoev.nginxError setting up http authentication ...
FromSent OnAttachments
HariFeb 28, 2008 10:42 am 
Igor SysoevFeb 28, 2008 10:50 am 
HariFeb 28, 2008 11:08 am 
Igor SysoevFeb 28, 2008 11:22 am 
HariFeb 28, 2008 11:39 am 
Igor SysoevFeb 28, 2008 11:44 am 
Fernando PerezMar 5, 2008 10:38 am 
Igor SysoevMar 5, 2008 10:53 am 
Fernando PerezMar 5, 2008 11:14 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Error setting up http authentication - 500 Internal Server ErrorActions...
From:Hari (hven@public.gmane.org)
Date:Feb 28, 2008 10:42:43 am
List:ru.sysoev.nginx

I am using the instruction given at http://wiki.codemongers.com/NginxHttpAuthBasicModule#auth_basic

When i access the site i get prompted for username and password. After i enter the username and password i get the error "500 Internal Server Error"

When i have the following two lines commented out i do not get any error. # auth_basic "osusu"; # auth_basic_user_file conf/passwd;

What am i doing wrong?

Here is the setup of my conf file ========================== upstream domain1 { server 127.0.0.1:8000; server 127.0.0.1:8001; }

server { listen 80; server_name www.osusu.com; rewrite ^/(.*) http://domain.com permanent; }

server { listen 80; server_name osusu.com;

access_log /home/demo/public_html/domain.com/shared/log/access.log; error_log /home/demo/public_html/domain.com/shared/log/error.log;

root /home/demo/public_html/domain.com/current/public/; index index.html;

location / { auth_basic "osusu"; auth_basic_user_file conf/passwd; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_redirect false;

if (-f $request_filename/index.html) { rewrite (.*) $1/index.html break; } if (-f $request_filename.html) { rewrite (.*) $1.html break; } if (!-f $request_filename) { proxy_pass http://domain1; break; } } } =================

I created the conf file using the utility htpasswd.

Any help on this is greatly appretiated...