0

I am using centOS 7 and I installed apache server in it. I created directory into /var/www/test ( 'test' directroy). I created a link directory using 'ln -s' command into /var/www/test directory. I want to access a link directory. I added the following line at the end of /etc/httpd/conf/httpd.conf file.

/etc/httpd/conf/httpd.conf

 <VirtualHost *:80>
       ServerName test.test
       DocumentRoot /var/www/
       Alias "/costs" "/web/filestorage/costs/"
 <Directory /var/www/>
       Options Indexes FollowSymLinks
       AllowOverride None
       Require all granted
   </Directory>
    <Directory /var/www>
       Options Indexes FollowSymLinks Includes ExecCGI
       AllowOverride All
       Require all granted
       Allow from all
    </Directory>
    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>

When I am accessing the link then it gives me the following error.

URL ERROR - Access forbiddon

1

Try this:

<Directory "/web/filestorage/costs">
    Require all granted
</Directory>

This will tell apache to allow connections to this directory.

  • Thanks. Actually, the problem was my centOS. It is SELinux. – Dipak Giri Jun 24 at 6:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.