I recently reinstalled Ubuntu and then installed the lamp-server
bundle via tasksel
and the installation went fine.
I had backed up the files from the /var/www/
folder and planned to just place them back once the server was back online (or in my case, accesible from my computer only - it's a test server.)
The installation completed and so I tried to copy the files over from the backup directory. This went fine.
However, when I try to access the server via localhost
from Firefox I get a 403 Forbidden error, which I never had before. HELP!!
EDIT: 9/2/2013 Added info about file happenings
So, I followed what @Andrew said, but I still can't access any .html files. Strangely enough, I can access the .php files (nothing displayed of course, as they only display the info pulled from a previously completed form.) But no html access, just the
Forbidden
You don't have permission to access /index.html on this server.
page
Well, found the answer to my problem, albeit trying to help another user with a similar problem!
This question https://askubuntu.com/questions/343172/add-apache2-vhost-at-home gave a link that gave me a solution! I just had to run
sudo chmod -R 755 /var/www
and now I can access it fine! Thanks for the help @Andrew, but I got this one myself!First, add your user to the
www-data
group.Then, set ownership of
/var/www/
to thewww-data
group.Finally, set permissions for the
/var/www/
directory.Hope this helps.