GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   .htpasswd questions (https://gfy.com/showthread.php?t=517619)

donnie 09-17-2005 08:42 AM

.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 09-17-2005 08:45 AM

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/

ServerGenius 09-17-2005 08:47 AM

Quote:

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.

dodger21 09-17-2005 08:54 AM

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.

FrankWhite 09-17-2005 08:56 AM

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

donnie 09-17-2005 09:06 AM

Quote:

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

PbG 09-18-2005 11:13 AM

Agreed...

Quote:

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.


Calvinguy 09-18-2005 11:56 AM

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

LBBV 09-18-2005 05:43 PM

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

venus 09-18-2005 05:48 PM

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>
----

Quote:

Originally Posted by Calvinguy
Can someone post an example of a .htaccess file using more than one htpasswd file?


venus 09-18-2005 05:50 PM

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

Quote:

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



All times are GMT -7. The time now is 02:27 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123