我的Nginx Laravel子loder安装程序禁止403,但在浏览器URL加载页面中添加了/public/index.php。
据我所知,权限设置正确-
sudo chown -R madguy:www-data /var/www/madguy.com/horizontal-laravel
sudo chmod -R 755 /var/www/madguy.com/horizontal-laravel
sudo chgrp -R www-data storage bootstrap/cache
sudo chmod -R ug+rwx storage bootstrap/cache
这是我的配置-
# Webroot Directory for Laravel project
root /var/www/madguy;
index index.php index.html index.htm index.nginx-debian.html;
# Your Domain Name
server_name madguy.com www.madguy.com;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
# PHP-FPM Configuration Nginx
location ~ \.php$ {
fastcgi_pass unix:/run/php/php7.2-fpm.sock;
include snippets/fastcgi-php.conf;
}
location /horizontal-laravel {
try_files $uri $uri/ /horizontal-laravel/public;
}
请问配置有什么问题?
编辑:而且所有路线都返回到同一仪表板页面。