htaccess joy

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • solonline
    Confirmed User
    • Jan 2003
    • 718

    #1

    htaccess joy

    just wondering if its possible to authenticate 2 .htpasswd files from the same .htaccess,

    so normally it reads from 1
    AuthUserFile /home/httpd/somesite.com/cgi-bin/data/.htpasswd

    but is there a way to link to 2 .htpasswd files located in differnt directories in the cgi dump.

    any help will make my life happier tonite

  • fiveyes
    Confirmed User
    • Aug 2001
    • 1680

    #2
    This seems to be a question that comes up regularly. The htaccess specification allows only one named htpasswd file. The reason for this is simplicity, as soon as you allow two or more htpassword files, you'd have people wanting different ways of using them. Such as allowing access if the user name is one or the other htpasswd file (OR), in both files (AND) or in one but not the other (XOR).

    Since this is a fact (outside of a few exotic, unofficial modules that have been written that claim to get around this limitation), you need to find a solution that basically accomplishes the same.

    If it's simply a matter of having two groupings of users; where one has access to one section, the other group to another and both groups have access to a third; then simply have your registration program enter the UserName:Password combination to the appropriate htpasswd file as well as to the third, for-everyone, password file. Any other solutions are based on that, using the registration script to include the access combinations in the appropriate files.
    <CENTER><A HREF="http://www.hot-off-bourbon.com/" target="_blank"><IMG SRC="http://www.hot-off-bourbon.com/images/hob-logosmall.jpg" border="0"></A>

    <FONT face="Comic Sans MS" SIZE="-1"><I>Mardi Gras, Spring Break, Wet-T, Night Club Action, UpSkirt, Oil Wrestling, Voyeur</I></FONT></CENTER>

    Comment

    • foe
      Confirmed User
      • May 2002
      • 5246

      #3
      happy happy joy joy

      Comment

      • foe
        Confirmed User
        • May 2002
        • 5246

        #4
        or make a program that would take two password files merge them and save them as one.

        Comment

        • Ice
          Confirmed User
          • Nov 2002
          • 26053

          #5
          this link was posted on GFY the other day.... should do everything your asking

          http://www.paysitepowertools.com/
          icq 1904905

          Comment

          • fiveyes
            Confirmed User
            • Aug 2001
            • 1680

            #6
            Another solution is using the htgroup file. This makes for a more complex registration program as well but you basically have one htpasswd file for everything. Then you have a htgroup file that defines which users are in which user groups ("groupname1: user1 user2 user3 ..."). Finally, in your htaccess files, instead of specifying "require valid-user" you'd use "require group groupname1 [groupname2]*" (where groupname2, and more, are optional).

            This is a sorthand usage of "require user1 user2 user2 ..." and can be quite powerful for defining access to different parts of the document tree.
            <CENTER><A HREF="http://www.hot-off-bourbon.com/" target="_blank"><IMG SRC="http://www.hot-off-bourbon.com/images/hob-logosmall.jpg" border="0"></A>

            <FONT face="Comic Sans MS" SIZE="-1"><I>Mardi Gras, Spring Break, Wet-T, Night Club Action, UpSkirt, Oil Wrestling, Voyeur</I></FONT></CENTER>

            Comment

            • solonline
              Confirmed User
              • Jan 2003
              • 718

              #7
              k...thanks for replys, its 3am here and im half blind with all this now. Sleep then work...
              anyone else tried paysite power tools ?

              Comment

              • some_idiot
                Confirmed User
                • May 2002
                • 1511

                #8
                What you didn't hit me up on ICQ for this?

                I was the last one to give a detailed on this here...

                There's always a way, little custom C/C++ tweaks to your
                Apache and rebuild.

                I suspect your setup is going to require questions in more
                of a research/beta forum than here. Most of these guys run
                100 sites on 1 server, not 1 site on many servers.
                (well, 95% of the people here don't even own or even
                physically seen the server their site is on)

                This AVS pays my mortgage!

                Comment

                Working...