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 Answer 1

1

Try this:

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

This will tell apache to allow connections to this directory.

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .