【问题标题】:You don't have permission to access / on this server.您无权访问此服务器上的 /。
【发布时间】:2019-02-22 18:39:12
【问题描述】:

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

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

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

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

【问题讨论】:

  • 您需要更加准确地了解您的设置和问题。正如您所说,这是一个常见问题,但它有很多不同的原因。
  • 你能复制/粘贴你的 apache 配置文件吗?
  • 感谢回复,这是我的 apache2.conf:pastebin.com/Ykd8zpnn
  • 请粘贴您的 /etc/apache2/sites-available/yourappname.conf 文件。

标签: apache permissions webserver


【解决方案1】:

请替换 /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>

【讨论】:

  • 欢迎。乔·马克斯
猜你喜欢
  • 2013-06-30
  • 2017-05-04
  • 2015-10-06
  • 2015-10-07
  • 2012-12-08
  • 2017-05-30
  • 2015-12-24
相关资源
最近更新 更多