nginx支持PHP的CI
1.找到CI库的配置文件修改
$config['base_url'] = 'http://test.example.com';
$config['uri_protocol'] = 'PATH_INFO';
2.找到NGINX配置.在SERVER段中添加如下代码段
location /index.php{
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_param SCRIPT_FILENAME /home/wwwroot/index.php;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
include fcgi.conf;
}
转载于:https://blog.51cto.com/caozm/721553