Virtual host setup:

ServerName test.loc ServerAdmin webmaster@test.loc DocumentRoot /home/r/www/test.loc/web ErrorLog /home/r/www/logs/test.loc/error.log CustomLog /home/r/www/logs/test.loc/access.log combined <Directory /home/r/www/test.loc/web> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory> 

Additional server settings (except those that were by default):

 ## Файл персональных настроек веб-сервера Apache от Razzwan-a ## Чтобы устранить предупреждение при перезапуске Apache (хотя в целом на производительности это не отразится) ServerName test.loc ## Для того, чтобы Apache интерпретировал php и не предлагал сохранить php-файл AddType application/x-httpd-php .php .phtml ## Установка кодировки по умолчанию AddDefaultCharset UTF-8 ## Настройка базовой директории <Directory /home/r/www/> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory> 

Rights to the folder from which the site is loaded (/ home / r / www) 777.

It still gives an error:

 [Thu Dec 10 10:52:54.723123 2015] [core:error] [pid ****] (13)Permission denied: [client 127.0.0.1:] AH00035: access to / denied (filesystem path '/home/r/www') because search permissions are missing on a component of the path [Thu Dec 10 10:52:54.792334 2015] [core:error] [pid *****] (13)Permission denied: [client 127.0.0.1:] AH00035: access to /favicon.ico denied (filesystem path '/home/r/www') because search permissions are missing on a component of the path, referer: http://test.loc:81/ 

Apache tried to run from the same user who owns the files of the site - no changes.

What else can you check, look? Already there are no ideas.

  • one
    And Require all for what? I do not see that you have authentication settings that will put this "granted". Maybe just Allow from all to do - Mike

1 answer 1

filesystem path '/ home / r / www') because search permissions

one of the components in this path lacks the x attribute for the user on whose behalf apache works for you.

you can fix it, for example, like this (just in case the r attribute is added - read permission):

 $ sudo chmod +rx /home /home/r /home/r/www 

Require all granted

The require directive appeared only in version 2.4 of the apache program.

if you have, as indicated by the labels, version 2.2, then you should use the allow directive. eg:

 allow from all 
  • Thanks, helped to set all folders read permissions. - Razzwan
  • * for reading and execution - Razzwan