LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Pls. HELP -- Apache setting (https://www.linuxquestions.org/questions/linux-networking-3/pls-help-apache-setting-229199/)

swmok 09-11-2004 01:15 AM

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

zatriz 09-12-2004 04:30 PM

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.

swmok 09-13-2004 09:25 AM

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.

zatriz 09-13-2004 01:59 PM

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"

RHELL 09-13-2004 03:13 PM

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.


All times are GMT -5. The time now is 07:21 AM.