Sudden 403 error on root index, 404 on others

Everything was working for me today until I visited the Facebook debugger to test thumbnail loading on my base page: http://benmillett.us. I had also updated robots.txt for benmillett.us, but when I wiped it out with a blank one and also reverted back to my original, I get the same error.

I have directories and other sites set up like so:

benmillett.us/public_html/index.html = benmillett.us, returns 403, subfiles/folders return 404

public_html/blog = blog.benmillett.us subdomain (wordpress blog), loads fine

public_html/nealmillett.us = nealmillett.us sub/addon domain (wordpress blog), loads fine

public_html/agifforyou.com = agifforyou.com sub/addon domain (static website), loads fine

All folders and files in public_html are myuser:myuser. Files are 664, folders are 775.

The public_html/.htaccess has these lines only and is unchanged from before the 403 started happening.

AddType text/cache-manifest .manifest

 <ifmodule mod_expires.c=""><filesmatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$"="">ExpiresActive on
ExpiresDefault "access plus 6 months"</filesmatch></ifmodule> 

FileETag MTime Size

ErrorDocument 404 /404.php

Any ideas of what might resolve this? I just rebuilt my linode on Tues and am very, very reluctant to do that all again.

I've deleted the index.html and replaced it from a local copy, with no resolution.

7 Replies

@benmillett:

All folders and files in public_html are myuser:myuser. Files are 664, folders are 775.

Check directory permissions further up the directory tree from public_html, e.g. /home/benmillett, to see that the webserver user has read access.

/var/www = root:root, 755

/var/www/benmillett.us/ = ben:www-data, 750

/var/www/benmillett.us/public_html = ben:www-data, 750

Forgot to share versions on my LAMP, via curl –head http://benmillett.us

HTTP/1.1 403 Forbidden

Date: Fri, 15 Jan 2016 02:03:14 GMT

Server: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.14

Content-Type: text/html; charset=iso-8859-1

Also, in my apache2.conf, I have this at the end:

Options Indexes FollowSymLinks

AllowOverride All

Require all granted

IDK if this helps. I cut a chunk of my directory listing. My permissions are fine for my setup. Perhaps you can compare and see if you have a match. Although I am not sure, based on your explanation, how they might have got shot. I would focus on the index.

![](" />

Thanks jeremye77. My file permissions are consistent with yours. I'm really not sure how the permissions could have been changed either.

Since the publichtml/blog and publichtml/nealmillett.us load, I'll try clearing the other files off the server and re-upload them. Just so weird to me that the sub and addon work.

I checked logs and it seems that only the working sites are logging there (blog.benmillett.us and agifforyou.com). I updated the benmillett.us.conf to have Loglevel rewrite:trace3, disabled and reenabled that file followed by apache restarts, but it's still not logging to the log file, either the error or access logs, so there's not much help there.

SOLVED.

There was an extra host file benmillett.us (in addition to benmillett.us.conf) that pointed to /srv/www/benmillett.us/public_html. Once I updated that to point to /var and restarted, it all worked.

Thank you to Linode support for suggesting cat /etc/apache2/sites-enabled/*

And thanks to you all for your help with this.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct