Apache Alias forbidden access

429 views Asked by At

Apache Cannot serve Alias to folder outside DocumentRoot

Alias /hello /test

<Directory "/test">
  Options FollowSymLinks
  AllowOverride FileInfo
  Order Allow,Deny
  Allow from All
  Require all granted
</Directory>
1

There are 1 answers

2
jezuz On

Soruce: https://www.petefreitag.com/item/793.cfm

Just had to run:

chcon -R --reference=/var/www /test

Explanation:

If Running Security Enhanced Linux (SELinux)

Another possibility for this error is that you are running SELinux (Security Enhanced Linux), inwhich case you need to use chcon to apply the proper security context to the directory. One easy way to do this is to copy from a directory that does work for example /var/www/