Forum

.hiawatha requires me to login twice

Henrik
25 November 2010, 11:00
Hi,

I try to get the user/password to work with basic authentication but I experience two problems:
1) I have to login twice before I get in to my test page
2) I have to login again for every sub page I try to access


I have also tried to access the page with wget, giving me this output:
wget myserver.xx/test/ --http-user=testuser --http-password=testpasswd

--2010-11-25 10:55:02-- http://myserver.xx/test/
Resolving myserver.xx... 1.2.3.4
Connecting to myserver.xx|1.2.3.4|:80... connected.
HTTP request sent, awaiting response... 401 Unauthorized
Reusing existing connection to myserver.xx:80.
HTTP request sent, awaiting response... 200 OK
Length: 39 [text/html]
Saving to: `index.html.8'

Any idea what is generating these problems? The password file is in the root of my web server, fully readable and the error log doesn't give me any errors.

Hiawatha version: 7.4
Operating System: Win7
Hugo Leisink
26 November 2010, 09:25
I will look into this matter soon.
Hugo Leisink
28 November 2010, 10:51
I tried the HTTP authentication under Windows 7 myself, but here it all works fine. Can you show me your configuration file?
Henrik
29 November 2010, 10:54
# Hiawatha httpd.conf 
#

Binding {
Port = 80
MaxKeepAlive = 30
TimeForRequest = 3,20
}

ConnectionsTotal = 150
ConnectionsPerIP = 10
SystemLogfile = C:\Program Files\Hiawatha\log\system.log

#CGIextension = com,exe
#CGIhandler = C:\Program Files\Hiawatha\bin\ssi-cgi.exe:shtml, shtm, stm
#
# Download the PHP zip package from http://www.php.net/downloads.php
# and unzip to C:\Program Files\PHP5\
CGIhandler = C:\Program Files\PHP5\php-cgi.exe:php
# or
#FastCGIserver {
# FastCGIid = PHP5
# Extension = php
# ConnectTo = 127.0.0.1:2005
#}

Hostname = 127.0.0.1
WebsiteRoot = C:\wwwroot
StartFile = index.html
AccessLogfile = C:\Program Files\Hiawatha\log\access.log
ErrorLogfile = C:\Program Files\Hiawatha\log\error.log
ExecuteCGI = yes
#UseFastCGI = PHP5
#TimeForCGI = 10


c:\wwwroot\hwpwd
pictures:**************


.hiawatha
AccessList = pwd all
PasswordFile = basic:/cygdrive/c/wwwroot/hwpwd
Hugo Leisink
29 November 2010, 19:07
Hmmm, it all looks oke. Can't think of anything what might cause the problem. I'll think about this a little more.
Henrik
30 November 2010, 09:01
I don't know if it makes a difference, but those directories (each directory contains a set of pictures) I've already accessed only require me to login once next time. For the new ones, it's still two times. When I change to a web browser (e.g. to Safari) that I haven't used yet, it requires 2x per page. So it might not be an entirely server side problem. I've tried FF 3.6.12, Safari 5.0.3 and wget.

With the same web browsers I only have to login once though, to some other production pages using Apache and .htaccess
This topic has been closed.