[CentOS] Apache config for php?

Robin Mordasiewicz robin at mordasiewicz.com
Thu Mar 2 16:09:03 UTC 2006

On Thu, 2 Mar 2006, rado wrote:
> On Thu, 2006-03-02 at 10:25 -0500, Robin Mordasiewicz wrote:
>> here is a quick sample php script.
>> <?php
>> $myusername="Joe Blow";
>> echo "<html><body>";
>> echo "<h1>" . $myusername . "</h1>";
>> echo "</html";
>> ?>
> I know there is tons out there for this if I can just get the start or
> understand errrr the proper syntax or geez just get going.
> yes, index.php works fine. Is this to say that if you have an index.php,
> apache looks at and handles this first...taking the place of index.html?

The master config file for Apache is


when you want to add new virtual servers or special configuration options 
it is recomended to create a file


If you open the /etc/httpd/conf/httpd.conf file you will see a conf 
option called


You will see that when you installed php, that a file

was added.

if you open the file /etc/httpd/conf.d/php.conf, you can see that the 
option DirectoryIndex is not overridden but added to. Check the master 
httpd.conf file to see what options are set.

When you make a change to the apache configuration files you must do..
/etc/init.d/httpd reload

More information about the CentOS mailing list