I have a VPS with CentOS and I'm facing a very strange behavior by Apache webserver.
I started this server with 50GB of disk space and soon I ran out of space so I asked maintenance department and they added another 50GB as a new hard drive. So I created a new partition and mounted it in /home/media
and I moved all my website media files to this place and at the end I created an SymLink like this:
lrwxrwxrwx. 1 apache apache 12 May 15 14:07 media -> /home/media/
Today, I ran out of disk space once more and they did added a new hard drive with 100GB capacity this time. I just wanted to do the same as I did for /home/media/
but this time it's called /data/media
.
lrwxrwxrwx. 1 apache pooya 12 Jun 9 22:43 media -> /data/media/
Now when I navigate to files in media folder in browser, I get Forbidden 403
error.
I checked Apache's error log and it says: Symbolic link not allowed or link target not accessible: /var/www/html/media.
All the solutions for this error on Internet is to add Options Indexes FollowSymLinks
or webserver facing access problems with symliked directory.
I have the FollowSymLinks
in both apache config file and my root .htaccess
file. All the files and folders and also their parents in /data/media/
are chmodded to 777 and the chown of them is apache:apache
.
What is wrong with my webserver?