Default .php for Apache/LiteSpeed based servers

Jamie@DreamIT Host

Verified User
Joined
Jan 24, 2021
Messages
45
Location
Australia
I'm sure someone here would find this handy if you're looking for an easy way to default .PHP files for Apache/LiteSpeed based servers (handy if you install WordPress via Softaculous or migrate from another host).

Nginx based servers will default to .PHP.

Code:
#creates custom conf dir
mkdir -p /usr/local/directadmin/custombuild/custom/ap2/conf/extra

#adds custom directory index
echo "DirectoryIndex index.php index.html index.shtml index.htm index.phtml" > /usr/local/directadmin/custombuild/custom/ap2/conf/extra/httpd-directoryindex.conf

#this is optional but sets a recommend SSL configuration
/usr/local/directadmin/custombuild/build set ssl_configuration intermediate

#rebuilds apache conf
/usr/local/directadmin/custombuild/build rewrite_confs
 
Last edited:
Back
Top