0

I know that this has been posted about a ton, but I have spent the last day scouring through answers, trying everything and nothing is working. I've changed permissions, I've looked into the Apache2 logs, I've altered configuration files, and I'm still getting the 403 forbidden error. Here are the apache2. My html files are in /var/www/html.

I'm not completely sure, but I do recall troubles starting after trying to create user directories using:

sudo a2enmod userdir

Inside the Apache error logs, the only thing on there that could be leading to something is this:

(13)Permission denied: [client myip] AH00035: access to 
/folder/data/index.html denied (filesystem path 
'/var/www/html/folder/data/index.html') because search permissions are 
missing on a component of the path

In my /etc/apache2/sites-available/000-default.conf, I added the following at the very end:

<Directory /var/www/html>
AllowOverride All
</Directory>

In my apache2.confI have the following:

<Directory />
        Options FollowSymLinks
        AllowOverride None
        Require all denied
</Directory>

<Directory /usr/share>
        AllowOverride None
        Require all granted
</Directory>

<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride ALL
        Require all granted
</Directory>

<Directory /var/www/html>
        Options Indexes FollowSymLinks
        AllowOverride ALL
        Require all granted
</Directory>

Again, I'm very sorry that I needed to make this thread, but I don't want to continue to copy and paste solutions that could do more harm than good.

5
  • 1
    What are the permissions on /var/www/html ? Also check here for possible solution : superuser.com/questions/882594/… Aug 14, 2019 at 20:22
  • I chmod it to 755 Aug 14, 2019 at 20:25
  • You can check all the permissions with this command find /var/www -type d -exec ls -lh {} \; (for directories) and this find /var/www -type f -exec ls -lh {} \; (for files) to be sure. Aug 14, 2019 at 20:27
  • 1
    I noticed you have AllowOverride set to ALL instead of none and this can cause a 403 error sometimes. stackoverflow.com/questions/23171951/… Have you tried any of these other solutions outlined in this post?
    – mchid
    Aug 14, 2019 at 23:28
  • Thanks guys. I tried everything you specified (checked permissions, allowed overrride set to none) and still nothing. Aug 16, 2019 at 12:46

1 Answer 1

0

Alrighty guys, so I know for most people this won't be the answer they're looking for. But to successfully fix this issue, I uninstalled apache2, and looked online for a lamp-stack install guide, and this new install fixed these errors!

1
  • Could you ... 1. Link to the guide. 2. Outline the essential parts of the guide that you found helpful. 3. Note how your current install is different from your previous one.
    – xiota
    Aug 21, 2019 at 10:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .