I installed apache 2.4.7 server as I switched from Windows, in which I used WAMP, so now I am using apache2 in Ubuntu I want to make old www
directory of WAMP as the new root directory of apache2 in Ubuntu.
So I made the following changes.
(My PC username is siraj
and name of the drive is MINE
)
In apache2.conf
file
<Directory /media/siraj/MINE/Business_Work/wamp/www/html>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
In 000-default.conf
file.
DocumentRoot /media/siraj/MINE/Business_Work/wamp/www/html
<Directory />
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
<Directory /media/siraj/MINE/Business_Work/wamp/www/html/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
and sudo chown -R www-data /srv/www/html
Now the thing is, in first case localhost running well, but in second case (when changing root directory to another drive) it shows following error:
Forbidden
You don't have permission to access / on this server.
Apache/2.4.7 (Ubuntu) Server at localhost Port 80
Here's My apache
error log.
(13)Permission denied: [client 127.0.0.1:51063] AH00529: /media/siraj/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/media/siraj/' is executable, referer: http://localhost/
Here's the output of command: namei -lx /media/siraj/MINE/Business_Work/wamp/www/html/
f: /media/siraj/MINE/Business_Work/wamp/www/html/
Drwxr-xr-x root root /
drwxr-xr-x root root media
drwxr-x--- root root siraj
Drwx------ siraj siraj MINE
drwx------ siraj siraj Business_Work
drwx------ siraj siraj wamp
drwx------ siraj siraj www
drwx------ siraj siraj html
I've seen almost all the similar questions asked here. But didn't find what I am missing here.