标签:
nginx完美支持tp框架
server {
listen 80;
server_name mit.520m.com.cn;
access_log /data/wwwlogs/mit.520m.com.cn_nginx.log combined;
index index.html index.htm index.php;
#include /usr/local/nginx/conf/wordpress.conf;
root /data/wwwroot/peita2.0;
location / {
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php/$1 last;
break;
}
}
location ~ \.php {
fastcgi_pass unix:/dev/shm/php-cgi.sock;
fastcgi_index index.php;
include fastcgi_params;
set $real_script_name $fastcgi_script_name;
if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") {
set $real_script_name $1;
set $path_info $2;
}
fastcgi_param SCRIPT_FILENAME $document_root$real_script_name;
fastcgi_param SCRIPT_NAME $real_script_name;
fastcgi_param PATH_INFO $path_info;
}
}
标签:
原文地址:http://www.cnblogs.com/hopelooking/p/5911981.html