LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-08-2004, 10:43 AM   #1
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 -current
Posts: 1,158

Rep: Reputation: 62
apache web server default page link


Hi,

I want to run Apache Web Server to host my website. I've everything setup pretty nice...only one small question.

When I ping my website, it shows a test page (/var/www/error/noindex.html). It says its a Apache default test page and that my server is configured correctly. Now I have an index page in /var/www/html called index.html which I want to show by default.

Note:If I type www.my-website-name.com/index.html it shows the index page I want my clients (that i've designed) to see but if i type www.my-website-name.com...it shows that test page.

Any help would be appreciated...thanks in advance.
 
Old 07-08-2004, 11:42 AM   #2
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 -current
Posts: 1,158

Original Poster
Rep: Reputation: 62
Anyone has any clue to my question???? or is it just too dumb to answer... or do I should more
 
Old 07-08-2004, 12:15 PM   #3
jeffreybluml
Member
 
Registered: Mar 2004
Location: Minnesota
Distribution: Fedora Core 1, Mandrake 10
Posts: 405

Rep: Reputation: 30
you'll need to edit the file /etc/httpd/httpd.conf (think that's where its located)

search for the section that defines "DocumentRoot" and make it say /var/www/html

NOw, you may also want to look through the file to make sure that index.html is set as your default page name, which means that if you type yoursite.com it will give yoursite.com/index.html. I can't remember what this section is called, but just search the file for instances of "index.html" and see if you can find it.

I think the DocumentRoot will solve your problem though...

Note, the httpd.conf file is distro dependant. I usr Mandrake, and it's actually /etc/httpd/conf/httpd2.conf for me. In Fedora (and redhat, I assume) it's /etc/httpd/httpd.conf

Good luck, let us know if this doesn't solve the prob...
 
Old 07-08-2004, 12:21 PM   #4
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 -current
Posts: 1,158

Original Poster
Rep: Reputation: 62
Thanks Jeffreybluml, I'm using RH 9. I am actually at work so i dont have access to my machine right now...I will try it tonight.

I've already set the document root to /var/www/html. I think i'll have to edit httpd.conf to set my default page as you instructed.

I think that should do it...thanks for replying and I'll get back here if there's a hitch. Till then...enjoy!!!
 
Old 07-08-2004, 01:02 PM   #5
jeffreybluml
Member
 
Registered: Mar 2004
Location: Minnesota
Distribution: Fedora Core 1, Mandrake 10
Posts: 405

Rep: Reputation: 30
Okay, I found the section you need to look for. There should be something in there that looks like this...

# 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 index.htm index.shtml index.php index.php4 index.php3 index.phtml index.cgi
</IfModule>


So, either add that, or edit your section (if already present) to include index.html as one of the entries.


Good luck!
 
Old 07-08-2004, 11:36 PM   #6
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 -current
Posts: 1,158

Original Poster
Rep: Reputation: 62
Wow!!! Jeffreybluml...you nailed it buddy!!!
I didnt had that directory index thing in my httpd.conf and I added as per your suggestion and VOILA!!! I am done...thanks once again.
 
Old 07-10-2004, 03:06 PM   #7
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 -current
Posts: 1,158

Original Poster
Rep: Reputation: 62
One more problem...I just replaced my index.html by another page. As a local host I can see the new page but when i ping my server from another computer it still shows the old page which does not exist. I thought it may be because i havent restarted the server so I did that but it doesnt work. Any tips????

Note: the new page is also index.html so no nomenclature problem that I see.
 
Old 07-10-2004, 03:25 PM   #8
jeffreybluml
Member
 
Registered: Mar 2004
Location: Minnesota
Distribution: Fedora Core 1, Mandrake 10
Posts: 405

Rep: Reputation: 30
SOunds to me like the computer from which you're accessing the page just needs it cache refreshed (done by clicking refresh or reload).

If you copied over the old page, and it literally does not exist anymore, then that could be the ONLY reason, the other computer is just showing you the page it has stored in it's memory...

Perhaps you should also adjust the cache settings for that computer to look for a newer version of pages on every visit. Look through the options or preferences in the cache and cookie areas for this setting...

Good luck...
 
Old 07-10-2004, 04:27 PM   #9
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 -current
Posts: 1,158

Original Poster
Rep: Reputation: 62
Thanks Jeffreybluml I checked on another browser and it works but not in firefox (on winxp)...I was worried my new page was not visible to others...Thanks once again.
 
Old 07-10-2004, 05:22 PM   #10
jeffreybluml
Member
 
Registered: Mar 2004
Location: Minnesota
Distribution: Fedora Core 1, Mandrake 10
Posts: 405

Rep: Reputation: 30
try this in your firefox...

click tools -> options
click on privacy (on left)
expand cache section
click clear

try again...
 
  


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
changing the default file apache web server looks for gsgleason Linux - Software 3 11-18-2005 12:31 PM
Forbidden access to soft link on apache web server bnj Linux - Software 3 05-03-2005 08:14 AM
Sysinfo link on web server main page hrp2171 Slackware 0 10-13-2004 05:10 PM
I cant change the default test page in apache server to add my page.y nhemapriya Linux - Newbie 3 05-13-2004 12:35 PM
Reach web page from Apache Red Hat Server zeljka Red Hat 1 01-06-2004 12:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:45 PM.

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