Welcome! Log In Create A New Profile

Advanced

auth php error

Posted by 5GCt7 
auth php error
May 04, 2014 03:26PM
Hello,

I have a centos 6 server where I would like to have basic authentication of a directory containing a wordpress blog.
my virtual.conf looks like this:

server {
listen 80;
# listen *:80;
server_name myserver.com www.myserver.com;

location / {
root /usr/share/nginx/html/myserver;
index index.html index.htm index.php;
}


location ~ \.php$ {
root /usr/share/nginx/html/myserver;
# fastcgi_pass 127.0.0.1:9000;
fastcgi_pass unix:/tmp/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}


location /members {
auth_basic "Basic Auth";
auth_basic_user_file "/usr/share/nginx/html/myserver/Zombaio_Data/.htpasswd";
location ~ \.php$ {
#root /usr/share/nginx/html/myserver/members;
# fastcgi_pass 127.0.0.1:9000;
fastcgi_pass unix:/tmp/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}

}


}


when I open the /members It asks for the password and accepts is, but does not open the index.php it sais 404 error
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 135
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready