1

I develop projects that I've located in /home/user/projects directory. This directory is chmod 777. The problem is that I'm always getting Error 403 Forbidden when I try to access this directory or any subdirectory. This is how my /etc/apache2/sites-available/000-default.conf looks like:

<VirtualHost *:80> ServerName localhost ServerAdmin [email protected] DocumentRoot /home/user/projects ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined Options +FollowSymLinks <Directory /> Options FollowSymLinks AllowOverride None Order allow,deny allow from all </Directory> <Directory /home/gtakacs/projects> Options Indexes FollowSymLinks MultiViews AllowOverride all Order allow,deny allow from all Require all granted </Directory> </VirtualHost> 

What's wrong with this? When I used /var/www as my document root, everything worked.

3 Answers 3

1

EDIT : try doing chmod -R 777 /home to make sure all your home is available (note that this solution is NOT RECOMENDED, having your project in /var/www would definitely be a better solution in my opinion)

(Can't comment so post reply)

Isn't there a config file in your project where you're supposed to set who can access the app? Check if you didn't forget to add your ip adress and domain name in this file.

When using Apache2 with Django framework (python), I had the same error, and it was because I forgot to add the domain name to authorized hosts.

You can also check access.log and error.log to have more detailed informations on what caused the error.

Sign up to request clarification or add additional context in comments.

Comments

1

Command out:

#Order allow,deny 

Comments

0

I had this issue before, the problem might be that your document root does not contain the described directories.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.