index.html opens up fine but index.php saying 404 not find page [duplicate]

Possible Duplicate:
How to configure php5 on apache2.2?

I have bought new apache server 142.4.4.15
It opens up index.html but cannot open index.php
I have php, apache and mysql installed on to it.
Apache status showing working fine….
Is their any php configuration I am missing out in Apache…

Please help me…..

Answer

In you apache conf file probably located in

/etc/httpd/conf/httpd.conf 

You need to make sure you have this line:

DirectoryIndex index.html index.php

if not add the index.php and restart apache.

You also need to make sure you have:

Include /etc/httpd/mod_php.conf 

or whatever path it is in.

Also while in there you may want to turn off server tokens. It will add an extra layer of security.

Also check permissions on your index.php file to make sure they match the owner and system privileges. If not then chown and chmod the file appropriately.

All these edits will require a httpd restart.

Attribution
Source : Link , Question Author : Wazzzy , Answer Author : J Baron

Leave a Comment