即日起在codingBlog上分享您的技术经验即可获得积分,积分可兑换现金哦。

only file name index.php is not working on apache2

栈溢出 user2855235 137℃ 0评论
本文目录
[隐藏]

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?

Thankx,
Kamil

2.被采纳答案

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! ?

3.其他高票答案

3.1.第1个答案

Do you mean it’s not recognized? You can try to add it to your .htaccess file in the root of your webserver:

DirectoryIndex index.php

转载请注明:CodingBlog » only file name index.php is not working on apache2

喜欢 (0)or分享 (0)
发表我的评论
取消评论

*

表情