LAMP Stack development environment 403 error



Hey Guys

My first post and new to the OS so please go easy. My question is simply i followed the guide to get a LAMP dev environment working. I followed this guide Install Apache, MariaDB, PHP (LAMP) 2016

All working , but then i added virtual hosts and it failed miserably and now gives me 403 errors across the board .

Some help would be amazing to get this working

Thanks in advance


Have you checked if the webserver user (www-data I guess) has permission to access the directory and it’s containing files?


I highly recommend using nginx or lighttpd for your server, unless you’re doing something which specifically requires apache (which most things shouldn’t). Lighttpd is a much lighter server and is easier to configure. It can handle more traffic too.


Since the guide doesn’t mention virtual hosts, so how do you add a virtual host?
Also a 403 means no right to access. Are the permissions ok and are you sure the restrictions are correct.


Check your Apache logs.


See i thought that straight away but i sudo chmod -R 755 all the folders and still nothing


seemed to have been permissions on a higher level folder all seems to work now


Can you be more specific, it may help other users that experience a similar issue down the line.


All directories in the tree need to be set +X (executable) for the relevant users, not just the target directory.

For example:


all need to be rwx--x--x, with the final one rwxr-xr-x (assuming it needs to be world-readable and not just grou-readable).


So I set the home folder to

chmod 775 /home/

Seems to work for the index file of the project

Just on to a new set of issues


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.