用户
 找回密码
 入住 CI 中国社区
搜索
查看: 1792|回复: 1
收起左侧

[已解决] ci 在nginx下的404问题,按照论坛和网上的编辑的配置文件无效

[复制链接]
发表于 2017-3-10 21:08:55 | 显示全部楼层 |阅读模式
之前都是在apache上面弄,突然老板让换,按照网上的来弄,都没效果,不是 404  就是Access denied. 权限都改成了755,求助求助 centOS下的
PHP复制代码
 
######################## 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;
    }
  }
 
 
 
复制代码

发表于 2017-3-10 23:52:27 | 显示全部楼层

本版积分规则