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 |
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. |
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. |
Quote:
|
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. |