LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-23-2007, 01:51 PM   #1
major.tom
Member
 
Registered: Jun 2003
Location: Canada
Distribution: Slackware (current); Gentoo (newbie)
Posts: 142

Rep: Reputation: 15
Apache2 User Authentication


I recently updated my Slackware 11 box to -current. One of the many things updated was Apache 1.3 -> 2.2. However, now user authentication no longer works on my website.

I've copied the users and groups files from the old /etc/apache to the new /etc/httpd directories. Also updated httpd.conf, but still get 403 - Forbidden errors.

The folder has an index.php (and php is working).
auth_basic_module is enabled (only ssl isn't by default).

Here are the relevant areas of my config file:
Code:
<Directory />
    Options None
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>

<Directory "/chroot/httpd/www">
    Options FollowSymLinks MultiViews
    AllowOverride FileInfo Limit
    Order allow,deny
    Allow from all
</Directory>

<IfModule dir_module>
    DirectoryIndex index.html index.php
</IfModule>

<IfModule alias_module>
    Alias /blah "/chroot/httpd/var/blah"
    <Directory /chroot/httpd/var/blah>
        AuthType Basic
        AuthName "blah"
        AuthUserFile  /etc/httpd/users
        AuthGroupFile /etc/httpd/groups
        Require group admin
        Satisfy All
        Options FollowSymLinks Indexes
        AllowOverride None
    </Directory>
</IfModule>
Any suggestions would be much appreciated.

Garry

Last edited by major.tom; 06-23-2007 at 01:54 PM.
 
Old 06-23-2007, 04:20 PM   #2
tobyl
Member
 
Registered: Apr 2003
Location: uk
Distribution: slackware current
Posts: 768

Rep: Reputation: 64
I'm no expert on apache, but could it be related to the fact that the default httpd user is now apache and I think it was nobody before?
So if you haven't you might want to chown and chmod your users and groups files to allow root/apache appropriate access rights.
Also, I take it 'Require group admin' is satisfied?

just a couple of thoughts,

oh, and don't forget the error log.../var/log/httpd

tobyl

Last edited by tobyl; 06-23-2007 at 04:27 PM.
 
Old 06-23-2007, 04:32 PM   #3
major.tom
Member
 
Registered: Jun 2003
Location: Canada
Distribution: Slackware (current); Gentoo (newbie)
Posts: 142

Original Poster
Rep: Reputation: 15
I suspect you're right. I had created a custom user & group (httpd:httpd) for apache 1.3 to run in so it would be chrooted. I'm just going through the permissions to update them to the new user.

The authentication was working before (with 1.3) so the users/groups should be ok.

I tried generating a new password file, and it appears to have a slightly different format from the old one.

One interesting thing is that I'm not prompted for a password. It just goes directly to the 403 page. This suggests to me that it's not even realizing that this folder requires a password.

AllowOverride AuthConfig is for use when you have a .htaccess file in the folder in question, right? (I don't use them.) I've tried both ways with the same results.

Thanks for your help!

Garry
 
Old 06-23-2007, 05:00 PM   #4
major.tom
Member
 
Registered: Jun 2003
Location: Canada
Distribution: Slackware (current); Gentoo (newbie)
Posts: 142

Original Poster
Rep: Reputation: 15
Just thought I'd follow up that I think I resolved this issue. When updating the httpd.conf file from to Apache 2.2, I'd included 2 lines that weren't in my current file:

Code:
<Directory />
    Options None
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>
Once removed, I was prompted for a password and got in.

Thanks,

Garry
 
Old 06-23-2007, 05:18 PM   #5
tobyl
Member
 
Registered: Apr 2003
Location: uk
Distribution: slackware current
Posts: 768

Rep: Reputation: 64
Ah, didn't spot that, glad you got it sorted

tobyl
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to know what user apache2 runs as? tenzan Debian 3 07-10-2005 10:56 AM
User authentication triley Linux - General 6 10-06-2004 03:02 PM
Apache2 not prompting for basic authentication elias4444 Debian 0 08-04-2004 12:03 PM
Squid proxy with user authentication and user rights duvanhorn Linux - Networking 0 08-07-2003 03:40 AM
Apache users - Basic login authentication with Apache2 piglingz Linux - Software 1 04-06-2003 09:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration