
nginx设置:
server {
listen 80;
server_name _;
root /www/wwwroot;
location / {
index index.php index.html index.htm;
if (!-e $request_filename)
{
rewrite ^(.*)$ /index.php?s=$1 last;
}
}
location ~ [^/]\.php(/|$)
{
# limit_conn perip 4;
# limit_req zone=reqip burst=4 nodelay;
# comment try_files $uri =404; to enable pathinfo
try_files $uri =404;
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
include fastcgi.conf;
# include pathinfo.conf;
}
}
最佳答案