| From | Sent On | Attachments |
|---|---|---|
| Ian Hobson | May 22, 2009 8:56 am | |
| Jim Ohlstein | May 22, 2009 9:29 am | |
| Ian Hobson | May 22, 2009 10:12 am | |
| Igor Sysoev | May 22, 2009 10:21 am | |
| Michael Shadle | May 22, 2009 10:26 am | |
| Jim Ohlstein | May 22, 2009 10:30 am | |
| Michael Shadle | May 22, 2009 10:36 am | |
| Igor Sysoev | May 22, 2009 10:42 am | |
| Jim Ohlstein | May 22, 2009 10:45 am | |
| Jim Ohlstein | May 22, 2009 10:54 am | |
| Ian Hobson | May 22, 2009 2:51 pm | |
| Igor Sysoev | May 22, 2009 10:30 pm |
| Subject: | basic-authentication and php? | |
|---|---|---|
| From: | Ian Hobson (ia...@ianhobson.co.uk) | |
| Date: | May 22, 2009 8:56:05 am | |
| List: | ru.sysoev.nginx | |
Hi all,
I'm trying to set up basic authentication to protect an area of the website served by php.
The critical bits of my server directive are.
server ( listen 80; server_name site.com www.site.com; root /var/www/site.com/htdocs; index index.php index.html index.htm; access_log /var/www/site.com/access.log;
location ~ \.php { include /etc/nginx/fastcgi_params; fastcgi_pass 127.0.0.1:9000; }
location ^~ /usage/ { auth_basic "Hello, Please login"; auth_basic_user_file /var/www/site.com/passwords; }
location ^~ /ppg/ { auth_basic "Hello, Please login"; auth_basic_user_file /var/www/site.com/passwords; } }
The directory /usage/ does NOT contain any php files and works just fine.
The directory /ppg/ contains index.php - which is sent to the browser, not to fastcgi :(
So how can I configure it. (If basic-auth cannot work, it would be ok to use allow and deny all.)
I'm using nginx 0.6.35
Thanks
Ian





