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