Apache 403指示灯和符号错误

Apache 403指示灯和符号错误,apache,symfony,ubuntu,Apache,Symfony,Ubuntu,在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 permi

在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>

我似乎没有安装selinux,因为在其他一些问题中给出了此解决方案。我不认为自己是一个新手,我成功地拥有了很多这样的测试环境,但是这个Linux是一个全新的安装,一段时间内没有其他网站在上面工作…

< P>你在你要服务的目录中检查过你有<代码> 0644 <代码>吗?您还授予

www-data
用户访问该目录的权限,请注意,您试图提供服务的文件夹位于您的主目录中。

我有775个文件夹,但即使有www-data:www-data的权限,它也不起作用。“请注意,您试图提供服务的文件夹位于您的主目录中”它允许在重新安装时将其放在安全的地方。这是禁止的吗?一点也不,伙计,我想说的是需要额外的配置,比如权限、用户和组,对你来说最好的方案是使用docker,但这取决于你服务器上的功能。我可以做额外的配置。我已经这样做了:“为用户christophe:christophe设置了访问权限,www数据是christophe组的一部分,mod是775,但即使有www数据:www数据,我也会得到错误。”您只是将
775
添加到项目的文件夹中,如果是这样,它将无法工作,因为unix中的权限系统是递归的,如果您的父文件夹的权限与子文件夹的权限不同,这将阻止这些权限发挥作用,最好是在www data可以访问的目录(如/var/www)中创建指向项目文件夹的符号链接
 127.0.0.1       memory.test