码迷,mamicode.com
首页 > 其他好文 > 详细

nginx完美支持tp框架

时间:2016-09-27 11:27:59      阅读:130      评论:0      收藏:0      [点我收藏+]

标签:


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;
}
}

nginx完美支持tp框架

标签:

原文地址:http://www.cnblogs.com/hopelooking/p/5911981.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!