I recently purchased a GoDaddy hosting package and uploaded all of my website files written primarily in PHP from scratch. But when I try going to my site, it only loads the head portion of the file then throws a 500 error in the inspection panel. Some Googling around told me that there's not a lot of information to be had from a 500 error and to check my cPanel logs.
The cPanel logs:
[Mon Sep 11 09:38:33.529493 2017] [autoindex:error] [pid 22333:tid 140627618502400] [client xx.xx.xx.xx:53218] AH01276: Cannot serve directory /home/mrzander/public_html/: No matching DirectoryIndex (index.html.var,index.htm,index.html,index.xhtml,index.wml,index.perl,index.pl,index.plx,index.ppl,index.cgi,index.jsp,index.js,index.jp,index.php4,index.php3,index.php,index.phtml,index.shtml,default.htm,default.html,home.htm,index.php5,Default.html,Default.htm,home.html,welcome.html) found, and server-generated directory index forbidden by Options directive
[Mon Sep 11 09:26:18.658155 2017] [autoindex:error] [pid 22417:tid 140627555563264] [client xx.xx.xx.xx:52447] AH01276: Cannot serve directory /home/mrzander/public_html/: No matching DirectoryIndex (index.html.var,index.htm,index.html,index.xhtml,index.wml,index.perl,index.pl,index.plx,index.ppl,index.cgi,index.jsp,index.js,index.jp,index.php4,index.php3,index.php,index.phtml,index.shtml,default.htm,default.html,home.htm,index.php5,Default.html,Default.htm,home.html,welcome.html) found, and server-generated directory index forbidden by Options directive
[Mon Sep 11 08:38:29.568926 2017] [autoindex:error] [pid 9707:tid 140627871168256] [client 158.69.2.15:37794] AH01276: Cannot serve directory /home/mrzander/public_html/: No matching DirectoryIndex (index.html.var,index.htm,index.html,index.xhtml,index.wml,index.perl,index.pl,index.plx,index.ppl,index.cgi,index.jsp,index.js,index.jp,index.php4,index.php3,index.php,index.phtml,index.shtml,default.htm,default.html,home.htm,index.php5,Default.html,Default.htm,home.html,welcome.html) found, and server-generated directory index forbidden by Options directive
[Mon Sep 11 04:46:46.503303 2017] [autoindex:error] [pid 6487:tid 140627702421248] [client 69.58.178.58:50763] AH01276: Cannot serve directory /home/mrzander/public_html/: No matching DirectoryIndex (index.html.var,index.htm,index.html,index.xhtml,index.wml,index.perl,index.pl,index.plx,index.ppl,index.cgi,index.jsp,index.js,index.jp,index.php4,index.php3,index.php,index.phtml,index.shtml,default.htm,default.html,home.htm,index.php5,Default.html,Default.htm,home.html,welcome.html) found, and server-generated directory index forbidden by Options directive
Other StackEchange sites mentioned editing various conf files, but I don't have access to those (httpd.conf
, apache2.conf
, etc.; I just have access to an .htaccess
file in the public_html folder.
Is there something I need to do with the .htaccess
file to resolve this error?
EDIT: Forgot to add something. The actual index.php for the website is located in a public folder within the public_html
, so when someone goes to mysite.com, it directs them to mysite.com/public/index.php
. Earlier today, I added an index.html
to the public_html
folder just to see if it would survive the error; it did not.
EDIT2: The .htaccess
file
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule ^(.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
ErrorDocument 404 /404.html
ErrorDocument 403 /403.html
DirectoryIndex index.php index.html public/index.php
EDIT3: New Logs
[Mon Sep 11 20:16:48.016315 2017] [core:alert] [pid 23998:tid 140627618502400] [client 172.6.118.47:49812] /home/mrzander/public_html/.htaccess: Illegal option noindexes
[Mon Sep 11 20:16:48.016158 2017] [core:alert] [pid 23998:tid 140627618502400] [client 172.6.118.47:49812] /home/mrzander/public_html/.htaccess: Illegal option noindexes
[Mon Sep 11 20:15:49.343249 2017] [rewrite:error] [pid 25357:tid 140627702421248] [client 172.6.118.47:49809] AH00670: Options FollowSymLinks and SymLinksIfOwnerMatch are both off, so the RewriteRule directive is also forbidden due to its similar ability to circumvent directory restrictions : /home/mrzander/public_html/403.html
[Mon Sep 11 20:15:49.343177 2017] [rewrite:error] [pid 25357:tid 140627702421248] [client 172.6.118.47:49809] AH00670: Options FollowSymLinks and SymLinksIfOwnerMatch are both off, so the RewriteRule directive is also forbidden due to its similar ability to circumvent directory restrictions : /home/mrzander/public_html/
[Mon Sep 11 20:15:44.029303 2017] [rewrite:error] [pid 8377:tid 140627733890816] [client 172.6.118.47:49807] AH00670: Options FollowSymLinks and SymLinksIfOwnerMatch are both off, so the RewriteRule directive is also forbidden due to its similar ability to circumvent directory restrictions : /home/mrzander/public_html/403.html
[Mon Sep 11 20:15:44.029232 2017] [rewrite:error] [pid 8377:tid 140627733890816] [client 172.6.118.47:49807] AH00670: Options FollowSymLinks and SymLinksIfOwnerMatch are both off, so the RewriteRule directive is also forbidden due to its similar ability to circumvent directory restrictions : /home/mrzander/public_html/
.htaccess
file? I tried a combo ofDirectoryIndex disabled
,DirectoryIndex index.html index.php
, andDirectoryIndex public/index.php
to no avail per the link you provided.options FollowSymLinks
at the least.