Hello i would like set up nginx like I want. I have read a lot of manuals (including official) but i can't make it work as I expect.
I have next urls: /user/register, /user/login, /user/logout etc ... no any urls with php files.
So i would like to pass all non real file urls to fast-cgi server. Btw, fpm working in chroot.
This is my config file:
server {
listen 80; ## listen for ipv4
server_name domain;
root /var/www/domain/htdocs;
include /etc/nginx/security;
fastcgi_read_timeout 6000;
location / {
try_files $uri $uri/ @php-fpm;
}
location @php-fpm {
fastcgi_pass unix:/tmp/php5-fpm.sock;
include /etc/nginx/fastcgi_params;
fastcgi_param DOCUMENT_ROOT /htdocs;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
}
}
in nginx log i see:
- - [31/May/2012:16:02:12 +0300] "GET /user/register HTTP/1.1" 403 46 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.46 Safari/536.5"
in fpm log the next:
- - 31/May/2012:13:02:12 +0000GET /user/register403 /var/www/domain/htdocs/user/register 0.215 512 0.00%
I have Ubuntu 12.04 and nginx 1.1.19
P.S. On screen (in browser) i see only that text "No input file specified."