Sudden 403 error on root index, 404 on others
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/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/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
AllowOverride All
Require all granted
![](
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.
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.