server {
listen 80;
server_name localhost;
charset utf-8;
root /www/demo;
location / {
index index.php;
}
location ~ .*\.(php|php5)?$ {
fastcgi_pass localhost:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi.conf;
#rewrite ^/(.*)$ /index.php?$1 break;
}
location = /50x.html {
root html;
}
error_page 500 502 503 504 /50x.html;
error_page 404 = /index.html;
}
listen 80;
server_name localhost;
charset utf-8;
root /www/demo;
location / {
index index.php;
}
location ~ .*\.(php|php5)?$ {
fastcgi_pass localhost:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi.conf;
#rewrite ^/(.*)$ /index.php?$1 break;
}
location = /50x.html {
root html;
}
error_page 500 502 503 504 /50x.html;
error_page 404 = /index.html;
}