I have been having trouble getting a php script to work with nginx. Invoking the script my-url:90/useraccessauthorization/useraccessauthorization.php gives me a 404 error.
Below are my configuration details. Could someone please let me know what I am missing? Thanks in advance.
Edit: I should also mention that running "/etc/init.d/nginx reload" gives me the result:
Reloading nginx configuration: nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied) 2012/05/10 16:07:13 [warn] 18214#0: the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:1 nginx: the configuration file /etc/nginx/nginx.conf syntax is ok 2012/05/10 16:07:13 [emerg] 18214#0: open() "/var/run/nginx.pid" failed (13: Permission denied) nginx: configuration file /etc/nginx/nginx.conf test failed
/etc/nginx/sites-available/default :
server {
listen 90;
root /usr/share/nginx/www;
index index.html index.htm;
access_log /var/log/nginx/top-secret-project.access.log;
server_name localhost;
location / {
try_files $uri $uri/ /index.html;
}
location /doc {
root /usr/share;
autoindex on;
allow 127.0.0.1;
deny all;
}
}
server {
listen 90;
listen my-url:90;
server_name my-url;
access_log /var/log/nginx/saba.access.log;
location /assets/ {
autoindex on;
alias /home/kkaisare/Workspaces/top_secret_project/client/web/assets/;
}
location /private_content_server/ {
alias /home/kkaisare/Workspaces/top_secret_project/store/content/private_content_server/;
autoindex on;
}
location /production_content_server/ {
alias /home/kkaisare/Workspaces/top_secret_project/store/content/production_content_server/;
autoindex on;
}
include /etc/nginx/fastcgi_php;
}
/etc/nginx/fastcgi_php:
location /useraccessauthorization/\.php$ {
fastcgi_pass unix:/var/run/php-fastcgi/php.sock;
fastcgi_param SCRIPT_FILENAME /home/kkaisare/Workspaces/top_secret_project/store/content/production_content_server/$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}