Author Topic: Serve index.php first than index.html  (Read 5690 times)

0 Members and 2 Guests are viewing this topic.

Offline
*
Serve index.php first than index.html
« on: March 12, 2022, 09:07:45 AM »
I updates Apache to version 2.4.52, and some sites on the server start showing the default cwp page, this happens because the index.html start being handle before the index.php, the websites where I forget to delete the index.html are getting problems.

How can I change the settings to restore the previous configuration and start serve first the .php files?

I use Apache with nginx and use php cgi.

Offline
*****
Re: Serve index.php first than index.html
« Reply #1 on: March 12, 2022, 02:54:44 PM »
hi you can set Directory Index in htaccess or globally change it here /usr/local/apache/conf/httpd.conf
search for DirectoryIndex

example :

Code: [Select]
<IfModule dir_module>
DirectoryIndex index.php index.html.var index.htm index.html index.shtml 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.phtml default.htm default.html home.htm index.php5 Default.html Default.htm home.html
</IfModule>

Offline
*
Re: Serve index.php first than index.html
« Reply #2 on: March 13, 2022, 10:50:20 PM »
hi you can set Directory Index in htaccess or globally change it here /usr/local/apache/conf/httpd.conf
search for DirectoryIndex

example :

Code: [Select]
<IfModule dir_module>
DirectoryIndex index.php index.html.var index.htm index.html index.shtml 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.phtml default.htm default.html home.htm index.php5 Default.html Default.htm home.html
</IfModule>

Thank you!