Torgut
Aug 12 2003, 05:27 AM
Hi...
I'm new on Plesk after using a Cobalt for 3 years on RS.
I'm surprised that the only index file recognized is index.html? Can someone confirm this to me? No index.htm nor index.php! This is most incredible.
Would it be necessary to change manually the httpd.conf to use index.htm or index.php?
This is specially strange as I found diferent information . Example:
"Default Home Pages: The following files are automatically detected as home pages -- in that order:
index.html index.htm index.php index.php4 index.php3 index.shtml index.asp home.html home.htm home.php home.php4 home.php3 home.asp default.html default.htm default.php default.php4 default.php3 default.asp"
In
http://www.noahs-ark.us/plesk_support.html
4PSA
Aug 12 2003, 07:46 AM
All index.* files are recognized, but index.html has priority. If you have index.php and index.html the default file is index.html.
Torgut
Aug 12 2003, 09:11 AM
Oh no. Not with my brand new server.
As I told before only index.html is being recognized.
If I put there an index.htm I obtain a page from Apache informing there is no default file in there. Same goes with index.php.
4PSA
Aug 12 2003, 10:42 AM
In /etc/httpd/httpd.conf check for DirectoryIndex directive.
Torgut
Aug 14 2003, 02:49 AM
That solved the problem: in fact the only default index there was index.html, which is very wrong in a server "ready to go".
I added index.htm and index.php. Runs fine now.
dedi_ensim
Aug 14 2003, 04:07 AM
i only had index.html index.html.var........ now i know why i needed to put the link to the page for shtml files
Webart
Aug 30 2003, 06:03 AM
Hi,
is there a way of doing that without SSH, or with Plesk?
dedi_ensim
Aug 30 2003, 06:08 AM
dont think there is, plesk doesn't have the option.
Chris
Webart
Aug 30 2003, 06:16 AM
thanks,
can you help me with the right line of text i should use to edit the httpd.conf file from SSH after i login?
dedi_ensim
Aug 30 2003, 06:33 AM
make a backup
# cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.backup
put file into text editor
# pico -w /etc/httpd/conf/httpd.conf
find the line you need
# [ctrl] & [w]
enter what you want to search for:
DirectoryIndex
look for a line similar to:
DirectoryIndex index.html
add all the index pages you want to have (in priority order):
DirectoryIndex index.html index.htm index.shtml index.cgi index.php index.php3 index.php4 index.pl index.jsp
exit:
# [ctrl] + [x]
save the chnages
# y
restart apache
# service httpd restart
or
# /etc/rc.d/init.d/httpd restart
Chris
Webart
Aug 30 2003, 12:55 PM
dedi_ensim, thanks and sorry for the truble.
Everything is written very clearly, but the file looks like it's locked, both for backup and for saving the changes.
one more tip, please?
jyeung
Aug 30 2003, 02:51 PM
su root first before modifying the file.
Webart
Aug 30 2003, 03:17 PM

Thanks Guys, It's working just fine.
Rod
Sep 30 2003, 12:32 PM
I'm having problem with this...
heres what I have in my httpd.conf:
DirectoryIndex index.html index.htm index.php
I have index.php and index.html but apache is loading index.php instead of the .html
As long as I know, it should be reading in priority order, so that would be index.html
Any thoughts?
Thanks.
Running Plesk6 RH9
m7rgy
Oct 16 2003, 04:06 AM
QUOTE
Originally posted by Rod
I'm having problem with this...
heres what I have in my httpd.conf:
DirectoryIndex index.html index.htm index.php
I have index.php and index.html but apache is loading index.php instead of the .html
As long as I know, it should be reading in priority order, so that would be index.html
Any thoughts?
Thanks.
Running Plesk6 RH9
Ezeman
Sep 26 2004, 04:25 PM
QUOTE
Originally posted by Rod
I'm having problem with this...
heres what I have in my httpd.conf:
DirectoryIndex index.html index.htm index.php
I have index.php and index.html but apache is loading index.php instead of the .html
As long as I know, it should be reading in priority order, so that would be index.html
Any thoughts?
Thanks.
Running Plesk6 RH9
I am having almost the same problem as Rod. I need .HTML or .HTM to have priority over .PHP to hide my php development until it is complete. I've added both HTML and HTM files (even ASP

) but whatever I do, it's the .PHP file that shows.
All I have in httpd.conf is
DirectoryIndex index.html ...... and yet only index.php loads.
Trouble ticket guys sent me here but i cant find the answer. Any ideas?
FYI - EV1 also say :
This may be set in the /etc/php.ini file under:
; PHP's built-in default is text/html
default_mimetype = "text/html"
;default_charset = "iso-8859-1"
My php.ini is already set this way,?????!!!! This doesn't really make sense to me anyway. I want .PHP to be temporarily by-passed so why would they suggest I amend php.ini?
Help would be appreciated.
Kenny
Galactic Zero
Sep 27 2004, 08:40 AM
in your httpd.conf file are you entries in the order you want them to have priority?
i.e. DirectoryIndex at_domains_index.html index.html index.html.var index.shtml index.cfm
That is out of my httpd.conf file.
just put index.php index.cgi index.pl index.php2 etc anyplace in that string in the order you want your server to recognize them.
Ezeman
Sep 27 2004, 10:41 AM
QUOTE
Originally posted by Galactic Zero
just put index.php index.cgi index.pl index.php2 etc anyplace in that string in the order you want your server to recognize them.
Thanx Galactic but all i have in my /etc/httpd/conf/httpd.conf is
DirectoryIndex index.html
No mention of .php, .asp, .cgi or even .htm ????!!!???
I had both index.html & index.php and the php one showed, when all conventions I've heard says html should have priority. All EV1 (non)support could suggest is that they were confusing each other so I should remove the .php one. Such a piece of piss coz they should both happily sit next to each other .... I'm convinced there's another configuration file somewhere and they won't help me find it.
My index.php is a dynamic front end to a database driven site, which is not ready to show to the world. I've been forced to kill my home page so the html page will be seen. I CANNOT BELIEVE this is the answer. The server should surly be able to set-up to allow me to access index.php while the default is index.html.
Am I missing something?
Cheers
Kenny
Ezeman
Sep 27 2004, 10:51 AM
Just to be sure i wasn't missing something silly, I added index.htm & index.php to DirectoryIndex after index.htm just in case their presence did something.
My DirectoryIndex is now the same as everyone elses.
DirectoryIndex index.html index.htm index.php index.html.var
It didn't change squat and the server still gives priority to .php over .htm or .html.
AAAARRRGGGHHH!!!!!
NightHawk
Sep 27 2004, 12:37 PM
QUOTE
Originally posted by Ezeman
Just to be sure i wasn't missing something silly, I added index.htm & index.php to DirectoryIndex after index.htm just in case their presence did something.
My DirectoryIndex is now the same as everyone elses.
[B]DirectoryIndex index.html index.htm index.php index.html.var
It didn't change squat and the server still gives priority to .php over .htm or .html.
AAAARRRGGGHHH!!!!! [/B]
did you restart apache after making the changes? You have to restart apache in order for changes to httpd.conf to be read into the working deamon
../etc/rc.d/init.d/httpd restart ...is one way to restart apache
cache
Sep 29 2004, 01:17 AM
If you just want a temporary change to the index page for a site place an .htaccess file in your home directory and add the line
DirectoryIndex index.whatever
where "whatever" is the extension you want.
Whatever you put there is the last instruction Apache will see for DirectoryIndex and it will be the one it uses.
This may require a change to /etc/httpd/conf/httpd.conf
Look for an AllowOverride directive on a line by itself. If it is set to None, change it to either All or Options. If you change it to Options check the Options directive right above the AllowOverride directive to make certain that Indexes and not -Indexes is listed in the Options that .htaccess can set.
If you want to limit the abilities of .htaccess to just one domain, you can place the Options and AllowOverride directives in a vhost.conf file in the
/home/httpd/vhosts//conf directory. You will need to run
/usr/local/psa/admin/sbin/websrvmng --reconfigure-vhost --vhost-name= for it to take effect.
benthompson
Jan 9 2005, 02:59 PM
I am facing the same problem and whatever I changed on httpd.conf did not resolve the problem..
Anybody found it yet?
Ben
Squire
Jan 9 2005, 07:56 PM
Make sure you restart Apache after making the change Ben. It won't take effect until then, but the DirectoryIndex line in your httpd.conf file is the one you're looking for.
What does that line look like currently?
Also, remember that Apache will read them in order. So if index.html is first, and a file by that name appears in your site directory it's going to be displayed by default. Even if an index.php file also exists.
benthompson
Jan 10 2005, 01:53 AM
QUOTE
Originally posted by Squire
Make sure you restart Apache after making the change Ben. It won't take effect until then, but the DirectoryIndex line in your httpd.conf file is the one you're looking for.
What does that line look like currently?
Also, remember that Apache will read them in order. So if index.html is first, and a file by that name appears in your site directory it's going to be displayed by default. Even if an index.php file also exists.
This is how my defaultindex line looks on httpd.conf:
DirectoryIndex index.html index.htm index.cgi index.jsp index.php
and I did restart apache a few times after I changed this line but the problem still persists. It is reading index.php as default and loading that first...
Other thing I realised is(this is apache 2.0), there is another configuration file called : httpd20_app.conf and httpd.conf is loading this file after it finishes loading itself and httpd20_app.conf file has got the directoryindex line too and it looks like:
DirectoryIndex index.html index.htm index.shtml index.cgi index.php index.php3 index.php4 index.pl index.jsp
Both looks right but I tried to disable one in httpd20_app.conf and then restarted apache. It did not help...
So there must be something else....
Any help will be appreciated...
TigerMan98
Mar 2 2006, 08:54 PM
We recently migrated to a new server that has apache 2 and I was having the exact same problem with the DirectoryIndex directory not being used properly. After reading the comments above, I found the problem and fixed the issue on my server. Here's what I did:
> cd /etc/httpd/
> grep -rl DirectoryIndex *
conf/httpd.conf
conf.d/php.conf
> vi conf.d/php.conf
This file had 3 lines of directives, one of which was:
"DirectoryIndex index.php index.php3"
I made the change there, restarted apache and voila! Hope this helps someone else.
James
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.