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.

I installed PHP, Apache, Tomcat in Cent OS 5

Tomcat and Apache work fine together.

But PHP! that's problem.

The Source inside php is this

<?php phpinfo(); ?> //This works well only if the Filename is index.html but doesn't work if it's index.php..

I have short knowledge neither in linux and php.

Hope my question is in right form. thank you

share|improve this question

migrated from stackoverflow.com Jun 11 '12 at 12:33

This question came from our site for professional and enthusiast programmers.

add comment

2 Answers 2

up vote 3 down vote accepted

In your httpd.conf add a line like this:

AddType application/x-httpd-php .php .php3 .php4 .php5

Then restart Apache and you're on your way :)

share|improve this answer
    
wow, it works thank you alot –  Patrick Jeon Jun 11 '12 at 5:02
add comment

If you want to make index.php as your default page add

DirectoryIndex index.php index.html

inside your Apache Virtualhost entry.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.