1.原始问题：only file name index.php is not working on apache2
I’m using apache2 on ubuntu. My localhost is working fine and also php is working.
But only file name index.php is not working. If the file name is test.php or anything othe than index.php, it works.
Dont know it is apache prob or php, can anyone please help?
Avoid the htaccess file and edit http.conf. It should be the same listing DirectoryIndex there too. Add index.php and see if you get php to render.
Out of curiosity what do you see when you view index.html? It works! ?
Do you mean it’s not recognized? You can try to add it to your
.htaccess file in the root of your webserver: