codeigniter nginx配置
转载:http://www.nginx.cn/1134.html
server{
listen 80;
server_name www.ci.oa.com;
access_log /usr/local/services/nginx/logs/www.ci.oa.com.access.log;
error_log /usr/local/services/nginx/logs/www.ci.oa.com.error.log;
charset utf-8;
location / {
root /home/test/project/www/CodeIgniter-3.0.3;
index index.php;
try_files $uri $uri/ /index.php?$uri&$args;
}
location ~ ^.+.php {
include fastcgi_params;
root /home/test/project/www/CodeIgniter-3.0.3;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^((?U).+.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;
fastcgi_param CI_ENV testing; #.development/testing/production,ci的开发/测试/生产环境,用于$_SERVER['CI_ENV'])
}
}
如果我能一直坚持下去,就像坚持当初的梦想一样,或许我也能成为大神呢,哈哈哈。