在Ubuntu 16.04上运行LAMP服务器时,我在conf中定义了日志文件中的错误:
[Tue Dec 26 16:56:35.930629 2017] [core:error] [pid 21749] (13)Permission denied: [client 127.0.0.1:43872] AH00035: access to / denied (filesystem path '/home/christophe/public_html') because search permissions are missing on a component of the path
我使用以下内容设置我的.conf文件:
<VirtualHost *:80>
ServerName memory.test
ServerAlias www.memory.test
DocumentRoot /home/christophe/public_html/memory/web
<Directory /home/christophe/public_html/memory/web>
AllowOverride All
Require all granted
Allow from all
</Directory>
ErrorLog /var/log/apache2/memory_error.log
CustomLog /var/log/apache2/memory_access.log combined
</VirtualHost>
为用户christophe:christophe
设置访问权限,www-data是christophe组的一部分,mod为775,但即使使用www-data:www-data
,我也会收到错误。
/ etc / hosts文件包含以下行:
127.0.0.1 memory.test
我似乎没有安装selinux,因为这个解决方案在其他一些问题中给出。我不认为自己是一个新手,我成功地让许多测试环境以这种方式工作,但这个linux是一个全新的安装,有一段时间没有其他网站正在研究它......
答案 0 :(得分:1)
您是否检查过您尝试投放的目录中是否有0644
?此外,您还授予www-data
用户访问该目录的权限,请注意您尝试访问的文件夹服务位于您的主目录中。