Control Web Panel

WebPanel => Apache => Topic started by: kandalf on March 12, 2022, 09:07:45 AM

Title: Serve index.php first than index.html
Post by: kandalf 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.
Title: Re: Serve index.php first than index.html
Post by: Sandeep 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>
Title: Re: Serve index.php first than index.html
Post by: kandalf 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!