четверг, 4 сентября 2014 г.

Allow symbol links in Apache 2.4 Debian

Yesterday I attempted to add a symbol link into the server dirrectory and had 403 error. Today I solved this problem. And I am writing for remember. I use ubuntu, so the main configuration file path is /etc/apache2/apache2.conf. I assume you don't changes default configuration.

1. Do
chmod -o+x 
for every dir in a path to folder. For example:
sudo chmod o+x /home /home/user/ /home/user/work/ /home/user/work/game
2. Add FollowSymLinks in your dirrectory scope options.
<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Directory> 
 That is all.

PS: For mor protection you can write Options=FollowSymLinks into AllowOverride. After that you can add .htaccess with this option.