Forum

Basic auth

Uros
13 July 2009, 10:32
I'm having trouble to get basic auth work. Can you please help me.
It just opens page without asking for user/pass.

# DEFAULT WEBSITE
# It is wise to use your IP address as the hostname of the default website
# and give it a blank webpage. By doing so, automated webscanners won't find
# your possible vulnerable website.
#
Hostname = 127.0.0.1
WebsiteRoot = /usr/local/var/www/hiawatha
StartFile = index.html
AccessLogfile = /usr/local/var/log/hiawatha/access.log
ErrorLogfile = /usr/local/var/log/hiawatha/error.log
ErrorHandler = 404:/error.cgi


# VIRTUAL HOSTS
# Use a VirtualHost section to declare the websites you want to host.
#
VirtualHost {
Hostname = other-site
WebsiteRoot = /usr/local/var/www/hiawatha
StartFile = index2.html
PasswordFile = basic:/usr/local/var/www/hiawatha/.password
AccessLogfile = /var/www/my-domain/log/access.log
ErrorLogfile = /var/www/my-domain/log/error.log
TimeForCGI = 5
UseFastCGI = PHP5
UseToolkit = banshee
}


Hiawatha version: 6.15
Operating System: Ubuntu 2.6.24.23
Hugo Leisink
13 July 2009, 15:20
First, you have defined two websites which point to the same directory. I don't think that the hostname 'other-site' points to the right IP adres. In that case, the virtual host 'other-site' will never match a requested file, so the default website (hostname 127.0.0.1) is used. No password is needed to access that website.

Please, read the HOWTO about how to proper configure Hiawatha first.
This topic has been closed.