LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-11-2004, 01:15 AM   #1
swmok
Member
 
Registered: Jul 2003
Posts: 152

Rep: Reputation: 30
Pls. HELP -- Apache setting


Hello:

My server is "www.myserver.com" and the default homepage is located in
/var/www/index.html.

If the client go to "www.myserver.com/abc", it shows no homepage found.
I want to set that the URL: www.myserver.com/?????/????? go to the
default homepage.

What should I do?

Thanks.

MOK
 
Old 09-12-2004, 04:30 PM   #2
zatriz
Member
 
Registered: Aug 2003
Location: Seattle, Wa
Distribution: Fedora,Trustix,Debian
Posts: 290

Rep: Reputation: 30
You question is answered very nicely within the apache documentation or even reading through the httpd.conf file

read http://httpd.apache.org/docs/mod/cor...#errordocument
its half a page
but in short modify the
ErrorDocument 404 /cgi-bin/bad_urls.pl
to something like
ErrorDocument 404 /index.html or whatever your main file is called.
 
Old 09-13-2004, 09:25 AM   #3
swmok
Member
 
Registered: Jul 2003
Posts: 152

Original Poster
Rep: Reputation: 30
Hello:

Firstly, thanks for your reply. You're really a nice guy.

>but in short modify the
>ErrorDocument 404 /cgi-bin/bad_urls.pl
>to something like
>ErrorDocument 404 /index.html or whatever your main file is called. [/B][/QUOTE]

I really add a line "ErrorDocument 404 /index.html" in the httpd.conf and restart the apache (even reboot the machine later).

I still found that "www.myserver.com" go to the the default homepage /var/www/index.html
and "www.myserver.com" go to nothing.

Is there anything wrong? I am using the Debian 3.0 with kernel 2.4.
What can I do now?

thanks.
 
Old 09-13-2004, 01:59 PM   #4
zatriz
Member
 
Registered: Aug 2003
Location: Seattle, Wa
Distribution: Fedora,Trustix,Debian
Posts: 290

Rep: Reputation: 30
Quote:
Originally posted by swmok

I still found that "www.myserver.com" go to the the default homepage /var/www/index.html
and "www.myserver.com" go to nothing.
I guess im not understanding what you are trying to say. Both urls are exactly the same "www.myserver.com"
 
Old 09-13-2004, 03:13 PM   #5
RHELL
Member
 
Registered: Feb 2004
Location: Outermost mingetty
Distribution: RHEL3,RH4U4,Sol9, Sol10
Posts: 321

Rep: Reputation: 31
The DocumentRoot setting is the one that will set the default directory for the server. This can be done globally, or within a block defining a VirtualHost. You may also define Directory blocks.

The comments in httpd.conf are usually good enough to get you started.
 
  


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
Need help in setting up linux file server pls terence8888 Linux - Newbie 3 08-14-2005 05:08 AM
pls pls pls help me ! i'm tired with httpd config on fedora apache 2.0.48 AngelOfTheDamn Fedora 0 01-24-2004 05:12 PM
setting a dial up connection - PLS HELP s_diptiman Linux - Networking 1 12-03-2003 12:08 AM
setting up a file server on redhat 9.0? help me pls:( kothapallis Linux - Networking 1 12-02-2003 01:29 PM
Need help with apache pls. gonus Linux - Software 7 08-29-2002 03:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:46 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