I have a Linux server and a Windows server with a external drive for my website files. The problem only exists in Linux Apache configuration, where I cannot access the files for the sites located on the external drive.
This is the structure of my external drive:
/media/mintmate/NewVolume/Site
with two folders, one with Accept
and the other one is Testing
, both have the same website folders like website a
, website b
with test prefix for Testing folder.
This is what I have done so far:
I have created a file "sites.conf
" in /etc/apache2/sites-available
with this configuration:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /media/mintmate/NewVolume/Site
</VirtualHost>
and enabled this with sudo a2ensite sites.conf
Then I have edited apache2.conf
file with these settings:
<Directory /media/mintmate/NewVolume/Site>
AllowOverride None
Require all granted
Allow from localhost
</Directory>
After saving these files I've restarted the service(sudo service apache2 reload
and sudo service apache2 restart
)
When I go to localhost
on the server machine I get this message "Forbidden You don't have permission to access / on this server". I have also tried http://localhost/Testing/test-a/
and http://localhost/Testing/test-a/index.php
and yet the same error message.
This is the output of ls -al /media/mintmate/NewVolume/Site
:
total 10
drwxrwxrwx 1 mintmate mintmate 4096 Sep 25 18:57 .
drwxrwxrwx 1 mintmate mintmate 4096 Sep 25 18:57 ..
drwxrwxrwx 1 mintmate mintmate 0 Sep 21 15:35 Accept
-rwxrwxrwx 1 mintmate mintmate 912 Sep 24 19:20 index.html
drwxrwxrwx 1 mintmate mintmate 0 Sep 21 15:35 Testing
I have tried all the steps here: How do I change the root directory of an apache server? and Error message “Forbidden You don't have permission to access / on this server” and still no success. What am I doing wrong?