首页 > 编程学习 > LNMP:Nginx+PHP Ci框架配置注意事项
2015十二月15

LNMP:Nginx+PHP Ci框架配置注意事项

CodeIgniter

php.ini  修改:

cgi.fix_pathinfo=1

 

nginx/vhost/ 域名配置:

 

server {
listen 80;
server_name www.wizzer.cn wizzer.cn;
root “/data/www/www.wizzer.cn”;
location / {
index index.html index.htm index.php;
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php?$1 last;
break;
}
}
location ~ \.php(.*)$ {
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
include fastcgi_params;
}
}

Loading

本文地址:https://wizzer.cn/archives/3208 , 转载请保留.

本文目前尚无任何评论.

发表评论