Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Servers & Networking
FedoraForum Search

Forgot Password? Join Us!

Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 14th December 2005, 12:45 PM
sourin Offline
Registered User
 
Join Date: Dec 2005
Posts: 6
Question how to change the default page of apache from index.htm to default.htm

Hi all!
The IP of my system is 10.16.3.16
On accessing this ip from a browser I get the apache test page. I want a default.htm file to be displayed which is stored in the var/www/html folder. I know that by default it searches for the index.html file but i want it to search for my default.htm
How should i do that ???

Also, i would like to know how to turn off directory listing on FC4

Thanks in advance...

Last edited by sourin; 14th December 2005 at 12:55 PM.
Reply With Quote
  #2  
Old 14th December 2005, 01:46 PM
Zigzagcom Offline
Registered User
 
Join Date: Feb 2005
Location: CALIFORNIA, yeah
Age: 86
Posts: 1,657
Go to the /etc/httpd/conf/httpd.conf file and edit under Section 2: 'Main' server configuration (it's quite a bit down the file), so that the line starting with DirectoryIndex reads:

Quote:
#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
# The index.html.var file (a type-map) is used to deliver content-
# negotiated documents. The MultiViews Option can be used for the
# same purpose, but it is much slower.
#
DirectoryIndex default.htm index.html index.html.var
Save and close the file, then restart Apache (httpd) so it can re-read the configuration file. Make sure, that you have set the correct permissions for default.htm, i.e., 644 or -rw-r--r--.
__________________
Ziggy
Reply With Quote
  #3  
Old 14th December 2005, 01:58 PM
Zigzagcom Offline
Registered User
 
Join Date: Feb 2005
Location: CALIFORNIA, yeah
Age: 86
Posts: 1,657
The index listing is on by default, so you have to edit /etc/httpd/conf/httpd.conf for that as well...scroll down to the section below and remove the keyword "Indexes" from the line that is highlighted in red:
Quote:
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/var/www/html">

#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs-2.0/mod/core.html#options
# for more information.
#
#Options Indexes FollowSymLinks
Options Indexes FollowSymLinks
Save and close, restart Apache.
__________________
Ziggy
Reply With Quote
  #4  
Old 14th December 2005, 04:17 PM
foobar47's Avatar
foobar47 Offline
Registered User
 
Join Date: Nov 2005
Location: France - Lille
Posts: 406
Hy,

or redirect to the default.html file in the index.html file... not really usefull, less than httpd.conf file
you do that by editing index.html like that :
<html>
<head>
<META http-EQUIV="Refresh" CONTENT="0; url=http://yoursite.com/default.html">
</head>
</html>
Reply With Quote
  #5  
Old 15th December 2005, 09:05 AM
sourin Offline
Registered User
 
Join Date: Dec 2005
Posts: 6
Arrow

Thanks everyone. I had made the changes in the httpd.conf file but did not restart the httpd service which is why the changes were not visible to me.

But now I have got one more problem...

When I transfered my files from windows via cd burned by nero, all my files were named in capital letters but FC4 I think is case sensitive. It is not processing the files even though with the same name but difference in letter case.

I was stupid to have deleted the original files as soon as i had written them on the cd.

Isnt there any way to force linux to treat the files witouh being case sensitive as otherwise i will then have to rename around a thousand files which is going to a very painful job ????
Reply With Quote
  #6  
Old 15th December 2005, 10:22 AM
Zigzagcom Offline
Registered User
 
Join Date: Feb 2005
Location: CALIFORNIA, yeah
Age: 86
Posts: 1,657
Sourin, I cannot help you with this one. Another problem will be that folks with that kind of expertise might not see this post, because the title of this thread is not relevant to your last question...
try starting a new thread with a more appropriate title.
__________________
Ziggy
Reply With Quote
  #7  
Old 16th December 2005, 04:08 PM
this213 Offline
Registered User
 
Join Date: Jun 2005
Posts: 36
1. cd to the directory containing the directory that holds all of the files you want to convert to lower case.

2. enter
Code:
vi chcase.pl
3. hit escape twice, then the letter "i"

4. copy the script here and paste it into your terminal window (where you have vi opened): http://www.semitekie.com/viewtopic.php?p=11

5: in vi again, hit esc twice then type :wq!

6. enter
Code:
chmod 700 chcase.pl
7. enter
Code:
./chcase -r -d NAME_OF_DIRECTORY
change NAME_OF_DIRECTORY to match the name of the folder which holds all of the files you want to make lowercase.
Reply With Quote
Reply

Tags
apache, change, default, defaulthtm, indexhtm, page

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
A Default Fedora 7 Firefox Page? j_baer Fedora Focus 2 4th June 2007 04:36 AM
how to change the default page of apache from index.htm to default.htm sourin Servers & Networking 0 14th December 2005 12:42 PM
Can only see Apache Test page not my index.html mattmcquiff Servers & Networking 7 23rd November 2005 09:33 PM
Default web page selection soongwoo Using Fedora 3 24th October 2005 04:57 AM
How to change the default page for webserver? Stevenisme Servers & Networking 9 11th December 2004 12:19 PM


Current GMT-time: 02:53 (Thursday, 20-06-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat