LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-30-2006, 02:00 PM   #1
subnet_rx
Member
 
Registered: Oct 2001
Distribution: Ubuntu 9.10
Posts: 148

Rep: Reputation: 15
No php for DirectoryIndex?


My server guys are telling me that because our site resides in site root (/var/www/html/), that they cannot automatically setup the domain to go to index.php, it has to be index.html and then redirect to index.php. Is this true?

Server runs on Redhat AS 3 and Apache 1.3
 
Old 11-30-2006, 02:02 PM   #2
derxob
Member
 
Registered: Apr 2006
Location: Los Angeles, California
Distribution: Slackware, Ubuntu
Posts: 68

Rep: Reputation: 16
I dont think it is true. They should be able to add a line like: "AddType application/x-httpd-php .php" to the httpd.conf
 
Old 11-30-2006, 02:10 PM   #3
subnet_rx
Member
 
Registered: Oct 2001
Distribution: Ubuntu 9.10
Posts: 148

Original Poster
Rep: Reputation: 15
Well it runs php files just fine. And the only place that redirect is required(according to them) is the home page. I have installed several php scripts with no problem. Apparently, every time they delete the index.html in the site root, it reverts to an AS default page or something and won't go to index.php. Here is the DirectoryIndex line from httpd.conf

<IfModule mod_dir.c>
DirectoryIndex index.html index.htm index.shtml index.php index.php4 index.php3 index.phtml index.cgi
</IfModule>

Last edited by subnet_rx; 11-30-2006 at 02:12 PM.
 
Old 11-30-2006, 02:26 PM   #4
derxob
Member
 
Registered: Apr 2006
Location: Los Angeles, California
Distribution: Slackware, Ubuntu
Posts: 68

Rep: Reputation: 16
Oops. I meant to say DirectoryIndex index.htm index.php in my last post, not the AddType line. Looks like you already have that though.

Try adding a .htaccess file in your root directory that has the line
"Options +Indexes" in it. See what happens..
 
Old 11-30-2006, 02:29 PM   #5
subnet_rx
Member
 
Registered: Oct 2001
Distribution: Ubuntu 9.10
Posts: 148

Original Poster
Rep: Reputation: 15
Well, this is a production server for a corporate website. Doing something and seeing what happens isn't an option. I have to know before going in that this will work. I've just never heard of having to redirect to a php page because Apache will only direct to index.html.
 
Old 11-30-2006, 02:31 PM   #6
derxob
Member
 
Registered: Apr 2006
Location: Los Angeles, California
Distribution: Slackware, Ubuntu
Posts: 68

Rep: Reputation: 16
Adding Options +Indexes to .htaccess might work. Its not dangerous. Try it.

Also check out http://www.linuxquestions.org/questi...d.php?t=460362 - this guy had a similar problem and it was due to his profile in firefox, not apache.

Last edited by derxob; 11-30-2006 at 02:33 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
(Debian)DirectoryIndex not allowed here MDFH Linux - Newbie 1 02-04-2005 04:38 PM
Problem with DirectoryIndex and PHP not processing t3kn0lu5t Debian 5 12-02-2004 12:33 PM
Graphical Apache configuration under RedHat 9.0 fails to include DirectoryIndex? bastianmk Red Hat 0 03-02-2004 12:43 AM
apache 1.3.29 directoryindex and chmod axion0917 Linux - Software 1 11-30-2003 01:01 PM
Apache DirectoryIndex problem jester_69 Linux - General 1 07-14-2002 12:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration