Apache config for php?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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

/etc/httpd/conf/httpd.conf

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

/etc/httpd/conf.d/mydomain.com.conf

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

DirectoryIndex


You will see that when you installed php, that a file
/etc/httpd/conf.d/php.conf

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



[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux