LAMP Stack development environment 403 error

community-edition

#1

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


#2

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


#3

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.


#4

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.


#5

Check your Apache logs.


#6

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


#7

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


#8

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


#9

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

For example:

/
/www
/www/user
/www/user/application
/www/user/application/public

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).


#10

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


#11

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