ci 在nginx下的404问题,按照论坛和网上的编辑的配置文件无效
之前都是在apache上面弄,突然老板让换,按照网上的来弄,都没效果,不是 404就是Access denied. 权限都改成了755,求助求助 centOS下的######################## default ############################
server {
listen 80;
#server_name _;
access_log /data/wwwlogs/access_nginx.log combined;
root /data/wwwroot/default/yoc;
index index.html index.htm index.php;
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php/$1 last;
break;
}
location /nginx_status {
stub_status on;
access_log off;
allow 127.0.0.1;
deny all;
}
location ~ [^/]\.php(/|$) {
#fastcgi_pass remote_php_ip:9000;
fastcgi_pass unix:/dev/shm/php-cgi.sock;
fastcgi_index index.php;
#######
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
#######
include fastcgi.conf;
}
location ~ .*\.(js|css)?$ {
expires 7d;
access_log off;
}
location ~ /\.ht {
deny all;
}
}
参考官方教程 https://www.nginx.com/resources/wiki/start/topics/recipes/codeigniter/
页:
[1]