server listen 80 server_name test root home anon test index index php

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
server
{
listen 80;
server_name test;
root /home/anon/test;
index index.php index.html index.htm;
location "/"
{
index index.php index.html index.htm;
try_files $uri $uri/ =404;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /home/anon/test$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT /home/anon/test;
fastcgi_intercept_errors on;
include fastcgi_params;
}
}