Change index file

djcart

Verified User
Joined
Jun 29, 2021
Messages
122
Hi, I'm not sure how to change "Index Files" in general settings. Default file is index.html after index.php. In this moment I must remove index.html after installation.
 
That is correct. Because the index.html is used as the placeholder. If you create a new user with domain, it will add the index.html from the admin's or reseller's default directory. You know the one saying that "this domain is created then and then" etc. which will be shown after creation.

You can adjust that to your needs.

If you want to have index.php to be the first always, you have to create that customly like this for normal apache (litespeed has different directory.
If not exists then create:
Code:
mkdir -p /usr/local/directadmin/custom/
mkdir -p /usr/local/directadmin/custom/ap2
mkdir -p /usr/local/directadmin/custom/ap2/extra
cp /usr/local/directadmin/custombuild/configure/ap2/conf/extra/httpd-directoryindex.conf /usr/local/directadmin/custom/ap2/extra/

Now edit that httpd-directoryindex.conf in the custom/ap2/extra directory to your needs, so change the order of index.html and index.php like put index.php first in line.

After that issue this command.
Code:
cd /usr/local/directadmin/custombuild
./build rewrite_confs
and you're done.
 
Back
Top