httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Byrne <...@glasgowwestend.co.uk>
Subject Re: [users@httpd] apache on raq4 .htaccess and standard erorr behaviour not working.
Date Wed, 10 Dec 2003 22:03:18 GMT
on 12/10/03 8:40 AM, Boyle Owen at Owen.Boyle@swx.com wrote:
 
> So that's a Sun server with a Linux kernel, right? What apache is it
> running? 

Hi Owen,

Yes Sun server running Linux Kernel - I'm running Apache 1.3.20.

> 
>> - and the first time I tried to use
>> .htaccess to protect a
>> directory on my server, it did not work.
> 
> First, you *do* know that you can password-protect a directory without
> .htaccess? You can simply put the Auth directives directly into
> httpd.conf inside a <Directory> container. This is a good debug step
> since it eliminates problems with reading the .htaccess file. Try that -
> what happens?

I haven't tried that - because I wasn't exactly sure where to put the
directives in the http.conf file. I read many times I could do that - but I
haven't seen any examples.

> 
>> When trying to 
>> access the directory
>> via the browser I was getting an error dialog saying,
>> 'document contains no
>> data' (Netscape), or attempt to load accessing URL http... failed
>> (Explorer).
> 
> What do you get in the access log and error log?

Here are the logs.

Asking for a file that doesn't exist:

access log
www.glasgowwestend.co.uk 62.252.128.10 - - [10/Dec/2003:20:37:11 +0000] "GET
/asdf HTTP/1.1" 404 - "-" "Mozilla/5.0 (Macintosh; U; PPC; en-US; rv:1.0.2)
Gecko/20021120 Netscape/7.01"

error log:
[Wed Dec 10 20:37:11 2003] [error] [client 62.252.128.10] File does not
exist: /home/sites/site4/web/asdf

Asking for a file in a directory with .htaccess:
www.glasgowwestend.co.uk 62.252.128.10 - - [10/Dec/2003:20:43:11 +0000] "GET
/mymail/admin/ HTTP/1.1" 401 - "-" "Mozilla/5.0 (Macintosh; U; PPC; en-US;
rv:1$

There is no entry in the error log related to the .htaccess failure, that I
can find.

> 
>> 
>> After spending time on the Yahoo Raq forum I confirmed that
>> the .htaccess
>> file itself was not the problem (it was created correctly and had the
>> correct priveleges and so on) - it seems to be a problem with
>> apache itself.
> 
> There's a lot more to getting .htaccess to work than setting the file
> privileges and so on. The main difficulty people usually have is in
> configuring apache correctly to allow it to read the .htaccess file. Did
> you achieve this? In what way did you "confirm" that the problem was
> with apache?
> 
>> When the browser tries to access a file that does not exist,
>> I do not get
>> the standard 404 response - but get the same error messages as when
>> accessing a directory containing a .htaccess file (either
>> 'document contains
>> no data, or attempt to load accessing URL failed' depending
>> on browser)
> 
> Why do you think this message has something to do with the .htaccess
> mechanism? It seems it is more like a network error in a complex setup
> (one server proxying another and getting no response).
> 
> What happens when you request a non-existent file from a directory
> *without* .htaccess?

That is what I am saying above - when I try to access a non-existent file
from a directory without .htacces, I get the same error message.

> 
>> 
>> The following report back when trying to access a
>> non-existent file on my
>> server using links may be of use to an expert Apache debugger:
>> 
>> lynx -source -dump http://www.glasgowwestend.co.uk/fdj
>> Looking up www.glasgowwestend.co.uk.
>> Making HTTP connection to www.glasgowwestend.co.uk.
>> Sending HTTP request.
>> HTTP request sent; waiting for response.
>> Alert!: Unexpected network read error; connection aborted.
> 
> I'm not an expert Apache debugger but this looks like a network read
> error to me. Can you telnet on port 80 to the machine (command-line
> HTTP)? Can you ping it?
> 
>> Can't Access `http://www.glasgowwestend.co.uk/fdj'
>> Alert!: Unable to access document.
>> lynx: Can't access startfil
>> 
>> I have looked at the Apache configuration file to see if I
>> could notice any
>> obvious mistakes, but I didn't see anything - though I'm not
>> experienced
>> enough to know what to look for.
>> 
>> Any help with this problem would be much appreciated as it has been
>> unresoved for quite some time.
> 
> PS: Is your pub correspondent *really* called Roy Beers?

Yes, that's his real name :-)

Thanks,
Jim


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message