Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19
Apache Basic Authentication not working in Gentoo
Results 1 to 3 of 3

Thread: Apache Basic Authentication not working in Gentoo

  1. #1

    Apache Basic Authentication not working in Gentoo

    Hello all,
    I am a newbie in apache, less than 2 weeks of experience. I am
    trying to protect one of my directory in the web server with Basic
    authentication. I am using Gentoo Linux with apache-2.0.55. I see that auth_module is loaded as a Module. I have configured the Virtual Host like this. The problem is that the login dialog box never appears in the browser and the web page is immediately displayed. The configuration I used is (from etc/apache2/httpd.conf):

    Code:
    user backuppc
    group backuppc
    <VirtualHost anaconda.localhost.com:80>
           DocumentRoot /var/www/localhost/cgi-bin/BackupPC
           ServerAdmin root@anaconda.localhost.com
           ServerName anaconda.localhost.com
           ErrorLog logs/anaconda.localhost.com-error_log
           CustomLog logs/anaconda.localhost.comaccess_log common
           <Directory /var/www/localhost/cgi-bin/BackupPC>
                   Options FollowSymLinks
                   Options +ExecCGI
                   AuthName "Tiger Login:"
                   AuthType Basic
                   AuthUserFile /usr/local/etc/htpasswd
                   Require user libregeek
           </Directory>
    </VirtualHost
    I am able to run the same setup in my Fedora Core 4 server. But it fails in the Gentoo Server. I can't get what had gone wrong. I searched the MARC archives, but couldn't find a workable solution.
    Please help me. I am in great trouble.

    I can't find anything wrong in either syslog or apache log. Any help
    would be appreciable.

    regards
    libregeek

  2. #2
    Moderator
    Good Guru
    Compunuts's Avatar
    Join Date
    May 2001
    Location
    California
    Posts
    3,935
    Quote Originally Posted by libregeek
    The configuration I used is (from etc/apache2/httpd.conf):
    Apache2 no longer use httpd.conf as configuration file. It makes use of sites-enabled. We have a basic apache configuration in our PET area. Follow that.

    And then put in your dir setting to the config file that you use. For example, your site is put in at etc/apache2/sites-enabled/your-site then put that in that file and see what happened?

    I will also take a look at it when I have more time. But this should get you started to the right direction.

    HTH ...

    To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
    - The truely community run Linux/Floss forum !

    No IT BS !!

  3. #3
    Moderator
    Good Guru
    Compunuts's Avatar
    Join Date
    May 2001
    Location
    California
    Posts
    3,935
    I tested it and it worked.

    My directory is at
    Code:
    compunuts@sienna64:/var/www/test-dir$ pwd
    /var/www/test-dir
    compunuts@sienna64:/var/www/test-dir$
    My htpasswd file is at
    Code:
    compunuts@sienna64:/usr/sbin$ ls -l | grep compunuts
    -rw-r--r--  1 root root      19 2006-03-14 19:08 compunuts
    compunuts@sienna64:/usr/sbin$
    And finally, in my "/etc/apache2/site-enabled/compunuts" site config file
    Code:
           <Directory /var/www/test-dir/>
                   Options FollowSymLinks
                   Options +ExecCGI
                   AuthName "Sienna Login:"
                   AuthType Basic
                   AuthUserFile /usr/sbin/compunuts
                   Require user test
           </Directory>
    And it gave me the login prompt.

    I'm running Ubuntu 5.10 and Apache 2.0.54 .

    HTH ....

    To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
    - The truely community run Linux/Floss forum !

    No IT BS !!

Similar Threads

  1. New PET ::: Apache 2.0 - Basic
    By Compunuts in forum Linux - General Topics
    Replies: 0
    Last Post: 03-11-2006, 07:07 AM
  2. NT authentication for SQUID
    By waynefourie in forum Linux - Hardware, Networking & Security
    Replies: 0
    Last Post: 06-22-2004, 02:06 PM
  3. DBM User Authentication
    By infinite_root in forum Linux - General Topics
    Replies: 4
    Last Post: 11-14-2003, 05:03 AM
  4. Apache Authentication Problem
    By rhonneil in forum Linux - General Topics
    Replies: 2
    Last Post: 11-10-2003, 08:49 AM
  5. Public Authentication
    By Ashcrow in forum Linux - Software, Applications & Programming
    Replies: 7
    Last Post: 12-19-2002, 05:04 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •