.htpasswd questions

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • donnie
    Confirmed User
    • Jan 2003
    • 1630

    #1

    .htpasswd questions

    Can you have more then one .htpasswd file in your root directory?

    Can you have it like this:
    .htpasswd
    .htpasswd2
    .htpasswd3
    .htpasswd4 and so on...

    I want my sites (hosted on the same server) to use different .htpasswd files but I am not sure how to do this...

    I hope somebody understands my question...
  • FrankWhite
    Confirmed User
    • Nov 2002
    • 3540

    #2
    no you cant, why dont you just put all the rules in the same .ht file ?


    also read this

    http://www.freewebmasterhelp.com/tutorials/htaccess/

    Comment

    • ServerGenius
      Confirmed User
      • Feb 2002
      • 9377

      #3
      Originally posted by Doomed
      no you cant, why dont you just put all the rules in the same .ht file ?
      yes you can coz in apache conf virtualhost directive you can specify the name
      and location of each .htpasswd file.
      | http://www.sinnerscash.com/ | ICQ: 370820 | Skype: SinnersCash | AdultWhosWho |

      Comment

      • dodger21
        Confirmed User
        • Jan 2003
        • 2680

        #4
        Yes you can. I have one of my servers setup that way. Just specify in your .htaccess where it should look for the password file.
        icq: 237055440

        Comment

        • FrankWhite
          Confirmed User
          • Nov 2002
          • 3540

          #5
          ohh my bad, i thought he was asking if he could have different htaccess files, sorry.

          Comment

          • donnie
            Confirmed User
            • Jan 2003
            • 1630

            #6
            Originally posted by dodger21
            Yes you can. I have one of my servers setup that way. Just specify in your .htaccess where it should look for the password file.
            Thank you very much! That is exactly what I was trying to ask

            Comment

            • PbG
              Confirmed User
              • May 2003
              • 1025

              #7
              Agreed...

              Originally posted by dodger21
              Yes you can. I have one of my servers setup that way. Just specify in your .htaccess where it should look for the password file.

              Uncensored-Hosting | Photography by Gus

              Comment

              • Calvinguy
                Confirmed User
                • Oct 2002
                • 1752

                #8
                Can someone post an example of a .htaccess file using more than one htpasswd file?

                Comment

                • LBBV
                  Confirmed User
                  • Aug 2002
                  • 936

                  #9
                  If you're asking if you can have multiple password files for the same DIRECTORY, then the answer is no. If you want to password protect multiple directories where each directory has it's own password file, then the answer is yes...you just put a .htaccess file in each directory, pointing at the appropriate password file.

                  http://httpd.apache.org/docs/1.3/howto/auth.html has good information...

                  -- Bill
                  National Net Hosting. Handled.
                  See our new line of inexpensive Dedicated Servers | Cabinets starting at $795 | CDN
                  [email protected] | 888-4-NATNET | www.nationalnet.com

                  Comment

                  • venus
                    Confirmed User
                    • Jan 2003
                    • 3112

                    #10
                    here you go, this is what I use
                    ----
                    AuthUserFile PWFILES=/var/www/virtual/passwords/passfiles.txt
                    AuthGroupFile /dev/null
                    AuthName "Members"
                    AuthType Basic

                    <limit GET PUT POST>
                    require valid-user
                    </limit>
                    ----

                    Originally posted by Calvinguy
                    Can someone post an example of a .htaccess file using more than one htpasswd file?
                    Muscle/Fitness Adult Affiliate Program
                    Since 1997 www.venuscash.com

                    Comment

                    • venus
                      Confirmed User
                      • Jan 2003
                      • 3112

                      #11
                      you can have multiple pass files for one directory. There are a couple ways to do it.

                      Originally posted by LBBV
                      If you're asking if you can have multiple password files for the same DIRECTORY, then the answer is no. If you want to password protect multiple directories where each directory has it's own password file, then the answer is yes...you just put a .htaccess file in each directory, pointing at the appropriate password file.

                      http://httpd.apache.org/docs/1.3/howto/auth.html has good information...

                      -- Bill
                      Muscle/Fitness Adult Affiliate Program
                      Since 1997 www.venuscash.com

                      Comment

                      Working...