Welcome! Log In Create A New Profile

Advanced

nginx config file not directing to index

Posted by Beeblebrox 
nginx config file not directing to index
August 20, 2013 01:43PM
I have a very simple config file. All the different "web sites" are located as sub-directories of the document root

server {
listen 127.0.0.1:80;
server_name test.org;
root /data/http;
index index.html index.htm index.php;
fastcgi_index index.php;
include fastcgi_params;

location /sitebar {
fastcgi_pass unix:/var/run/php/php-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
}

# several other locations below here
}

Under this config, I get "access denied" error if I try http://127.0.0.1/sitebar, but I get the correct page if I go to http://127.0.0.1/sitebar/index.php. How can I correct this problem?

I also have another location where "location /nm", but the index file is in nm/nm-admin (a sub-folder). I can't get that one to work either:
fastcgi_param SCRIPT_FILENAME $fastcgi_path_info/nmadmin/$fastcgi_script_name;
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 124
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready