Nginx全新Codeigniter安装尝试访问控制器时显示404 Not Found

时间:2019-09-22 09:55:39

标签: php codeigniter nginx

我正在使用nginx open source stack中的bitnami.

当我打开http://localhost/ci时,它将显示 codeigniter欢迎页面,但是当我尝试访问控制器http://localhost/ci/index.php/welcomehttp://localhost/ci/welcome时,它显示 404不找到

nginx-app.conf

 index index.php index.html index.htm;
    location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_read_timeout 300;
        fastcgi_pass unix:/opt/nginx/php/var/run/www.sock;
        fastcgi_index index.php;
        fastcgi_param  SCRIPT_FILENAME $request_filename;
        include fastcgi_params;
    }

nginx-prefix.conf

location /ci {
    alias "/opt/nginx/apps/ci/htdocs";
    include "/opt/nginx/apps/ci/conf/nginx-app.conf";
}

我没有使用任何虚拟主机。

0 个答案:

没有答案