您无权访问此服务器上的 /。

You don't have permission to access / on this server.

我知道这个问题已经被回答了数千次,但我仍然面临这个问题,我无法解决。我是服务器新手。请帮忙。

我将用户和组更改为 www-data。我设置了如下权限。

这些是 directories/files 权限:(不能包含文件,因为服务器是 运行 在 VM 上) https://ctrlv.cz/shots/2018/09/18/LrCe.png

权限有问题吗?非常感谢您的正确指导。

请替换/etc/apache2/sites-available/yourappname.conf文件目录设置。

  <Directory /path/yourapp/public>
     Allow from all
     Options -MultiViews
     Options FollowSymLinks
     Options All
     require all granted        
     AllowOverride All
  </Directory>