Re: Linux/Apache

 
SOLVED
Go to solution
Nobody's Hero
Valued Contributor

Linux/Apache

This is a continuation from the post below, with the same title. Thanks for all the help.I changed the httpd.conf file and changed the 404 message to "The data for your selection has not been posted". This works great when I connect to the apache server localhost port 80.When I click on an empty document, I get this message just fine,works great. Now, when I connect from my desk through the NT domain, WIN2k, from my laptop, usine IE 5.5... I still get the default 404 message, not the message in http.conf file. Why is this happening. Arent I still using the httpd.conf file no matter how I connect to the web server runnin RH9 apaache?
UNIX IS GOOD
10 REPLIES 10
Stuart Browne
Honored Contributor

Re: Linux/Apache

Do you have multiple "" entries in your 'httpd.conf'?

If so, did you put your 'ErrorDocument' line within one of them? If you did, then this would explain it.

Otherwise we need to look further.



What does the 404 error you are getting look like? (can you save the out-putted HTML page, and attach it to a reply?). It might be possible that a proxy server is configured between you and your host, and that is seeing a 404 and showing it's own failure message.

Another possiblity is that the request is being redirected to somewhere else (iptables redirect, or similar NAT). To check this, have a look at the log files when you make your connection. The 'access_log' should show a 404 connection, as well as an associated 'error_log' entry (i.e.:
10.10.10.10 - - [09/Dec/2003:11:57:25 +1100] "GET /blah/ HTTP/1.0" 404 1054 "-
" "-"
and
[Tue Dec 09 11:57:25 2003] [error] [client 10.10.10.10] File does not exist: /
var/www/html/blah
). Show us these if you have them.
One long-haired git at your service...
Nobody's Hero
Valued Contributor

Re: Linux/Apache

Error looks like:

The page cannot be found
The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.

--------------------------------------------------------------------------------

Please try the following:

If you typed the page address in the Address bar, make sure that it is spelled correctly.

Open the rockfish home page, and then look for links to the information you want.
Click the Back button to try another link.
Click Search to look for information on the Internet.



HTTP 404 - File not found
Internet Explorer
#############################################
The only files I see for logs are: mrtg and usage. I cant seem to find a log. I'll keep looking.

root@rockfish html]# pwd
/var/www/html
[root@rockfish html]# ll
total 8
drwxr-xr-x 2 root root 4096 Aug 21 11:26 mrtg
drwxr-xr-x 2 webalizer root 4096 Dec 2 04:02 usage
UNIX IS GOOD
Nobody's Hero
Valued Contributor

Re: Linux/Apache

Found a couple logs:
10.100.222.49 - - [08/Dec/2003:20:06:10 -0500] "GET /ihs_fac_acct_rpt.html HTTP/1.1" 200 19256 "http://portal/RoleBased/Roles_cs/pr_view_frameset.aspx" "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; T312461)"
10.100.222.49 - - [08/Dec/2003:20:06:20 -0500] "GET /period1/NORTH_CORP.html HTTP/1.1" 200 3985 "http://rockfish/ihs_fac_acct_rpt.html" "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; T312461)"
10.100.222.49 - - [08/Dec/2003:20:06:24 -0500] "GET /period1/NORTH_CORP_mec.html HTTP/1.1" 200 5560 "http://rockfish/period1/NORTH_CORP.html" "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; T312461)"
10.100.222.49 - - [08/Dec/2003:20:06:27 -0500] "GET /period1/2898_adjdt.txt HTTP/1.1" 404 53 "http://rockfish/period1/NORTH_CORP_mec.html" "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; T312461)"

##########################################
Another tail of another access error log:
Mon Dec 08 20:01:12 2003] [info] (104)Connection reset by peer: core_output_filter: writing data to the network
[Mon Dec 08 20:01:12 2003] [info] (32)Broken pipe: core_output_filter: writing data to the network
[Mon Dec 08 20:06:27 2003] [error] [client 10.100.222.49] File does not exist: /asu/fininterface/fsprd/webreports/period1/2898_adjdt.txt, re
ferer: http://rockfish/period1/NORTH_CORP_mec.html



UNIX IS GOOD
Martin P.J. Zinser
Honored Contributor

Re: Linux/Apache

To see what is really going on:

From your PC do a

telnet server 80
GET /document/path HTTP/1.0

You need two returns after the GET and case matters. This should show you what the server delivers. If this is the missing.html document look for proxy settings etc., else you still have an issue with the server.

Greetings, Martin
Stuart Browne
Honored Contributor

Re: Linux/Apache

*nod* this states that the server is doing everying properly.

Martin's suggestion is the logical next step.

Did you look at the proxy settings in IE on your machine?
One long-haired git at your service...
Cristian Draghici
Frequent Advisor

Re: Linux/Apache

I remember some IE versions(don't know which) make the 404 pages beautiful/standard and ignore the server generated page. (Ie the browser has a setting somewhere that tells it to ignore the 404 document the server provides and just display it's local copy).

I think they came up with it because web designers keep changing 404 pages to suit their site's design making it hard for the user to realise that the page he/she is looking at is, in fact, an error page.

I'm sure a search on Google would clear this subject up - I think it's been talked to death.

This guy http://www.onlinetransmissions.com/articles/art_error_guidelines.asp
says you have to have an error page bigger than 512 bytes for IE 5+ to display it. (otherwise it displays it's own)


Hope this helps,
Cristi
Stuart Browne
Honored Contributor
Solution

Re: Linux/Apache

Didn't think of that one.

Tools
Options
Advanced
Browsing/Show Friendly HTTP error messages

is what you are thinking.
One long-haired git at your service...
Alexander Chuzhoy
Honored Contributor

Re: Linux/Apache

OK in order for what you want to work -you must do the following:
1. To add an entry to your virtual host like the following:
ErrorDocument 404 "Your message"
or
ErrorDocument 404 /missing.html
if you rather using second option -then you must create the file missing.html in the DocumentRoot folder and to add the desired lines to it.
If you use Internet Explorer then you must take Stuart's advice and uncheck the "Show Friendly HTTP error messages" option otherwise you'll see IE's message.

Best regards


Nobody's Hero
Valued Contributor

Re: Linux/Apache

Yes...thanks Stuart and everyone. Very good learning experience here for me. I am usually embedded in perl and ksh, so this was kind of a new area for me. Unchecking the friendly http box worked just fine. Now I need to see if there is a way to get everyones settings unchecked through some kind of distribution. Our standard image has this option checked.
10x
RPM
UNIX IS GOOD