
Пытаюсь настроить репозиторий Minecraft Technic Solder на своем домашнем сервере.
Вот мой 000-default.conf в /etc/apache2/sites-available/:
<VirtualHost *:80>
# Host that will server this project.
ServerName 192.168.1.19
ServerAdmin *email*
# The location of public directory.
DocumentRoot /home/evilarceus/TechnicSolder/public/
# Important options for solder public directory
<Directory /home/evilarceus/TechnicSolder/public/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
<Directory "/home/evilarceus/TechnicSolder/public/repo/">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Require all granted
</Directory>
# Useful logs for debug.
ErrorLog /home/evilarceus/TechnicSolder/logs/error.log
CustomLog /home/evilarceus/TechnicSolder/logs/access.log combined
Первый каталог (home/evilarceceus/TechnicSolder/public) работает отлично. Однако второй каталог (где я хочу разместить свой репозиторий) показывает 403 Forbidden.
Разрешения на repo/:
drwxrwxr-x 3 evilarceus evilarceus 4096 Oct 2 19:39 repo
журнал ошибок:
[Sun Oct 02 20:39:31.034401 2016] [access_compat:error] [pid 17874] [client 192.168.1.20:50072] AH01797: client denied by server configuration: /home/evilarceus/TechnicSolder/public/repo
Честно говоря, я не знаю, что делать в этот момент. Помощь была бы оценена по достоинству!
решение1
Добавьте строку Allow from all
после Order allow,deny
каталога /home/evilarceus/TechnicSolder/public/repo/
.
решение2
Этооченьраспространенная проблема при использовании файлов конфигурации Apache, содержащих как директивы аутентификации v2.4, так и v2.2.
Найдите все ваши старые Allow, Order, Satisfy and Require
директивы и измените их на Apache v2.4 Require
с блоками опций <Require(Any|All|None)>
, а затем закомментируйте загрузку mod_access_compat. В противном случае у вас будут продолжаться неожиданные проблемы, в основном приводящие к client denied by server configuration
.
После того, как ваша конфигурация будет очищена, добавьте все оставшиеся ошибки.