You are not logged in.

#1 2003-09-11 04:08:10

jskier
Member
From: Minnesota, USA
Registered: 2003-07-30
Posts: 383
Website

Apache and setting php files as default

I'm an ex-IIS administrator, and have a simple question for you...
I finally got everything with Apache, php, sql running smoothly- however, how do I set Apache to recognize index.php instead of index.html?

Thanks in advance,
JSkier


--
JSkier

Offline

#2 2003-09-11 04:35:07

red_over_blue
Member
Registered: 2003-07-19
Posts: 152

Re: Apache and setting php files as default

I'm not sure if this is what you are asking, but try adding the following to /etc/httpd/conf/httpd.conf

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps 

and

<Directory /home/httpd/htdocs/phptestdirectory >
    DirectoryIndex index.php
</Directory>

and also, don't forget to add APACHE_OPTS="-D PHP4" to /etc/conf.d/httpd


Don't forget to post your PKGBUILD in your thread when you announce a new package in incoming.
see HERE for details

Offline

#3 2003-09-11 05:10:17

jskier
Member
From: Minnesota, USA
Registered: 2003-07-30
Posts: 383
Website

Re: Apache and setting php files as default

<Directory /home/httpd/htdocs/phptestdirectory > 
    DirectoryIndex index.php 
</Directory> 

This is what I want, however, is there a way to make this global, so that all directories under html look for index.php?

Thanks again,
JSkier


--
JSkier

Offline

#4 2003-09-11 12:02:58

red_over_blue
Member
Registered: 2003-07-19
Posts: 152

Re: Apache and setting php files as default

Try using

DirectoryIndex index.php

just by itself (not inside directory tags).


Don't forget to post your PKGBUILD in your thread when you announce a new package in incoming.
see HERE for details

Offline

#5 2003-09-11 15:23:54

jskier
Member
From: Minnesota, USA
Registered: 2003-07-30
Posts: 383
Website

Re: Apache and setting php files as default

As I was about to put that line in I found the actual setting for it here:

# DirectoryIndex: Name of the file or files to use as a pre-written HTML
# directory index.  Separate multiple entries with spaces.
#
<IfModule mod_dir.c>
    DirectoryIndex index.html
</IfModule>

Sooner or later I'll  purchase a beginners book on Apache  :mrgreen:

Thanks once again,
JSkier


--
JSkier

Offline

Board footer

Powered by FluxBB