原因: ci框架是在Apache下进行开发的,如果要让基于ci框架开发的项目跑起来,需要对nginx进行如下配置。
nginx中的配置文件如下:
server {
listen 80;
server_name www.example.com;
root/data/www/www.example.com;
index index.php index.html index.htm;
location / {
try_files $uri $uri//index.php?$query_string;
}
location ~ \.php($|/) {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}}
网友评论