Index.html don't load on /

Wouter0100

Verified User
Joined
Nov 9, 2012
Messages
27
Dear Directadmin users,

When i create a new subdomain, it default generates a index.html. This is normal, but when i go to http://domain.tld/index.html, it works. But when i go directly to http://domain.tld/ it shows a 403 Forbidden error. Also, when i change the filename to index.php it works. And with index.htm it won't.

How can i fix this?

Thanks,
Wouter0100
 
Then your documentroot is not set right in your http configs or you are blocking something with .htaccess or something.

Code:
cd /usr/local/directadmin/custombuild
./build update
./build clean
./build rewrite_confs
 
First do what Chatwizrd wrote.

And with index.htm it won't.
That should work. Check /etc/httpd/conf/httpd.conf if index.htm is in the DirectoryIndex line, if not add it and restart apache.
It should look like this by default:
Code:
<IfModule dir_module>
    DirectoryIndex index.html index.htm index.shtml index.php index.php5 index.php4 index.php3 index.phtml index.cgi
</IfModule>
 
First do what Chatwizrd wrote.


That should work. Check /etc/httpd/conf/httpd.conf if index.htm is in the DirectoryIndex line, if not add it and restart apache.
It should look like this by default:
Code:
<IfModule dir_module>
    DirectoryIndex index.html index.htm index.shtml index.php index.php5 index.php4 index.php3 index.phtml index.cgi
</IfModule>


Yes, this is already correct. That was one of the things i was looking before i posted here. And, i will try the things Charwizrd said, thanks!
 
Then your documentroot is not set right in your http configs or you are blocking something with .htaccess or something.

Code:
cd /usr/local/directadmin/custombuild
./build update
./build clean
./build rewrite_confs

Nope, didn't worked. I got some DocumentRoot not exist errors, but that's for the subdomain i created. (It seems to be the deleted ones)

And:
Code:
<IfModule dir_module>
    DirectoryIndex index.html index.htm index.shtml index.php index.php5 index.$
</IfModule>
I think it's right?
 
Actually I meant directoryindex not documentroot. Do you have any .htaccess files in the subdomain folder or the parent folder that would reset directoryindex? Or do you have any template files that would set it in the http config for the subdomain.

Look in /usr/local/directadmin/data/users/<USERNAME>/httpd.conf and see if you see any DirectoryIndex lines because there shouldnt be any.

As a test you could always create a .htaccess file in the subdomain folder and set DirectoryIndex index.html and see if it works.
 
Actually I meant directoryindex not documentroot. Do you have any .htaccess files in the subdomain folder or the parent folder that would reset directoryindex? Or do you have any template files that would set it in the http config for the subdomain.

Look in /usr/local/directadmin/data/users/<USERNAME>/httpd.conf and see if you see any DirectoryIndex lines because there shouldnt be any.

As a test you could always create a .htaccess file in the subdomain folder and set DirectoryIndex index.html and see if it works.

Thanks, fixed!
 
Back
Top