Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

nginx config file not directing to index

$
0
0
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;

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>