Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.....

share|improve this question

marked as duplicate by Ward, HopelessN00b, Michael Hampton, Iain Oct 19 '12 at 17:45

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
Why -1.... Please help.... –  Wazzzy Oct 19 '12 at 14:10
    
It opens up index.html but cannot open index.html.. That makes no sense.. It opens index.html but not index.php? –  Sc0rian Oct 19 '12 at 15:03
    
I see you're with bluehost. Their tech support could probably help you better –  Safado Oct 19 '12 at 20:36

2 Answers 2

up vote 2 down vote accepted

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.

share|improve this answer
    
Thanks....BUT It is asking me for download....instead of displaying....Please help...I made all the changes in .htaccess instead of httpd.conf .... –  Wazzzy Oct 19 '12 at 15:53
1  
Well you also need to make sure you have: Include /etc/httpd/mod_php.conf or whatever path it is in. If you don't have access to the confs you will need to get your server host to assist you with enabling it. Also while in there you may want to turn off server tokens. It will add an extra layer of security. All these edits will require a httpd restart. –  J Baron Oct 19 '12 at 16:03
    
Thanks again...I tried to search for that file on my server...but it is not there.... –  Wazzzy Oct 19 '12 at 16:09
1  
Which file? httpd.conf or mod_php.conf?? Sounds like php may not be installed. it could be named php.conf or something similar.I'd need a lot more details about your server to go much farther. –  J Baron Oct 19 '12 at 16:17
    
I could not find mod_php.conf but i do see httpd.conf file..... –  Wazzzy Oct 19 '12 at 16:19

Seems like your Apache is missing PHP configuration, please refer to following article: PHP: Apache - Manual it explains what to do you to make your Apache to make it work w/ PHP.

share|improve this answer
    
Thanks for your answer....I appreciate that....Also I got my question to be Possible duplicate of....I am looking in to it...Thanks a lot.... –  Wazzzy Oct 20 '12 at 4:49

Not the answer you're looking for? Browse other questions tagged or ask your own question.