Re: [users@httpd] Apache 2.2.0 and Basic AuthType

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Joshua Slive wrote:

On 1/6/06, Mark McCulligh <mmcculli@xxxxxxxxxxxxx> wrote:
Joshua Slive wrote:

On 1/6/06, Mark McCulligh <mmcculli@xxxxxxxxxxxxx> wrote:


Hi Group,

I cannot get Basic AuthType to work with Apache 2.2.0.  Has something
changed between versions, like I have to uncomment something.

I am not going any special just a simple Basic Auth
<Directory "folder_name">
AuthType Basic
AuthName "Login"
AuthUserFile /usr/local/httpd/pwd/users.pwd
Require valid-user
</Directory>

When you access the folder it does not prompt the user to login, just
displays the forbidden(403) error message right away.

If I turn off Basic AuthType and "allow from all" everything works.


What does the error log say?

Joshua.


The access log file just have one line:

IP - - date "GET filename HTTP/1.1" 403 370 "-" "browser"

The error log file has nothing.

Everything is much harder if you randomly obscure parts of your
configuration and log entries.

Are you sure you have all the modules you need included in the server?
You'll need at least mod_auth_basic, mod_authn_file, and
mod_authz_user.

Joshua.
Sorry for leaving part out, just a lot of typing that I did not think was important.

Here is everything:

I configured Apache 2.2.0 with all modules on
./configure --prefix=/usr/local/httpd --enable-modules=all --enable-ssl --enable-so

In the httpd.conf file I uncommented the httpd-vhosts.conf, httpd-ssl.conf and httpd-default.conf options. No other changes.

I then added AWStats 6.5 to the server and added Basic Auth to the awstats folder to protect it.

This is want I added to the end of httpd.conf file
/#
# Directives to add to your Apache conf file to allow use of AWStats as a CGI.
#
Alias /awstatsclasses "/usr/local/awstats/wwwroot/classes/"
Alias /awstatscss "/usr/local/awstats/wwwroot/css/"
Alias /awstatsicons "/usr/local/awstats/wwwroot/icon/"
ScriptAlias /awstats/ "/usr/local/awstats/wwwroot/cgi-bin/"
#
# This is to permit URL access to scripts/files in AWStats directory.
#
<Directory "/usr/local/awstats/wwwroot"> /
AuthType Basic
AuthName "Login"
AuthUserFile /usr/local/httpd/pwd/users.pwd
Require valid-user
/</Directory> /

When I try to access the /awstats/awstats.pl file I get a 403 error, browser does not prompt me to login. It work fine if I don't add Basic Auth to the wwwroot folder. [AWStats default setup]

My access_log file has one line
10.197.29.143 - - [06/Jan/2006:13:14:09 -0500] "GET /awstats/awstats.pl HTTP/1.1" 403 370 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)"

I create the user.pwd file using the htpasswd command
htpasswd -c users.pwd testuser

Is there anything else you would like to know about my configuration?

In short I just configured Apache 2.2.0, setup vhost and ssl. Then tried to add AWStats.

Thanks for you help,
Mark.

---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux