In my development environment I feel comfortable to have my document root directory (www) in my home directory. It gives me much more flexibility for permission issues. To do so Open the /etc/apache2/sites-available/default
file with administrative privileged and change the document root as /home/{user}/www, in my perspective it is /home/tapan/www
1. Open /etc/apache2/sites-available/default
sudo gedit /etc/apache2/sites-available/default
2. Change as follows
From,
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
To,
DocumentRoot /home/tapan/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/tapan/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
Bingo!!! Now I dont ever face a big Forbidden in my browser 🙂
it did not work
What did you face? Did you restart your apache with “sudo service httpd restart” ? (I forgot to mention that 🙁 )
Thanks! It’s done.