/ / Directory-Aliasverzeichnis außerhalb von DocumentRoot - Apache, Virtualhost, Apache2.4

Directory Alias-Verzeichnis außerhalb von DocumentRoot - apache, virtualhost, apache2.4

Ich muss eine Route von meinem Haupt-Apache-Server zu einem Verzeichnis außerhalb von DocumentRoot umleiten, aber es wird immer ein verbotener Fehler zurückgegeben.

verboten

Sie haben keine Berechtigung, auf diesen Server zuzugreifen.

Dies ist meine 000-default.conf

<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html

Alias /test "/home/myuser/url.es/my-form/test"
<Directory /home/myuser/url.es/my-form/test>
Options FollowSymLinks
AllowOverride None
Require all granted
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Um zu testen, dass Verzeichnis Berechtigungen nicht das Problem sind, habe ich 777 gewährt:

drwxrwxrwx  6 root  root  4096 Feb  5 18:59 test

und drinnen:

drwxrwxrwx 2 root  root  4096 Feb  4 19:07 api
drwxrwxrwx 2 root  root  4096 Feb  4 19:07 assets
-rwxrwxrwx 1 root  root   585 Feb  4 19:07 crossdomain.xml
drwxrwxrwx 4 root  root  4096 Feb  4 19:07 img
-rwxrwxrwx 1 root  root  1818 Feb  4 19:07 index.html
-rwxrwxrwx 1 root  root    51 Feb  4 19:07 robots.txt

Antworten:

1 für die Antwort № 1

Überprüfen Sie Ihr Fehlerprotokoll und es wird Ihnen genau sagen, was das Problem ist. Wahrscheinlich hat eines der höheren Verzeichnisse keine Suchberechtigung für den Apache-Benutzer.

Sie scheinen nicht die Erlaubnis für DocumentRoot selbst zu erteilen. Vielleicht liegt das in Ihrem Hauptkonfigurationsteil.