Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 Jun 11 '12 at 12:33

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

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

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

Your Answer


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