未找到为cakephp web项目404配置NGINX
我这里有个问题, 我在Ubuntu虚拟机上安装了nginx,并将我的cakephp项目拉入/var/www。但问题是,当我试图使用nginx访问webroot文件夹中的index.php文件时,出现了404未找到错误。不过,路由是有效的,因为它写入URL“/members/login” 你有什么建议吗 以下是我的默认conf nginx文件:未找到为cakephp web项目404配置NGINX,php,cakephp,nginx,Php,Cakephp,Nginx,我这里有个问题, 我在Ubuntu虚拟机上安装了nginx,并将我的cakephp项目拉入/var/www。但问题是,当我试图使用nginx访问webroot文件夹中的index.php文件时,出现了404未找到错误。不过,路由是有效的,因为它写入URL“/members/login” 你有什么建议吗 以下是我的默认conf nginx文件: server { listen 80 default_server; listen [::]:80 default_server;
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/projet_web_cakephp/webroot;
index index.html index.htm index.nginx-debian.html index.php;
server_name mu-project.hd.free.fr;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.1-fpm.sock;
}
location ~ /\.ht {
deny all;
}
}
可能的重复可能的重复