Web Hosting Talk







View Full Version : Pass protecting Mod_throttle


Haze
09-26-2001, 12:54 AM
How do we do this considering the directory doesnt really exist?

iplexx
09-26-2001, 03:31 AM
IMHO it's not possible - maybe if you mess around in the code and program some authentication yourself...

the best solution so far is to put (the server stats at least) into some http://strangesubdomain.mydomain.com/strangepathtomodthrottle

nexzt
09-26-2001, 11:49 AM
sure you can just add this with in the <Location> tags..


AuthUserFile /Path/to/auth/file/.htpasswd
AuthType Basic
AuthName restricted
<Limit GET>
require valid-user
</Limit>

... so this would really look realistic.

<Location /throttle-me>

SetHandler throttle-me

AuthUserFile /Path/to/auth/file/.htpasswd
AuthType Basic
AuthName restricted
<Limit GET>
require valid-user
</Limit>

</Location>


This should work.. i havn't tested it but its just off the top of my head..

If you need anyting else done or some sort of an example pm/email me.

--
Zak

searley
09-26-2001, 02:15 PM
this is what i have done on my raq4,

vi /etc/httpd/conf/httpd.conf

and ammend to the following

<Location /throttle-status>
SetHandler throttle-status
AuthType Basic
AuthName Throttle
AuthPAM_Enabled on
require user admin
</Location>


this will ALLOW admin access

nexzt
09-26-2001, 02:52 PM
right, mine lets them use a specific users that are dedicated by a special .htpassword file.. either way works

Haze
09-26-2001, 06:10 PM
Originally posted by searley
this is what i have done on my raq4,

vi /etc/httpd/conf/httpd.conf

and ammend to the following

<Location /throttle-status>
SetHandler throttle-status
AuthType Basic
AuthName Throttle
AuthPAM_Enabled on
require user admin
</Location>


this will ALLOW admin access

Do we place this with each of the virtual host host settings? or where the module settings are?

searley
09-26-2001, 06:14 PM
It only need to be done once!!


you should already have something like


<Location /throttle-status>
SetHandler throttle-status
</Location>

change it to

<Location /throttle-status>
SetHandler throttle-status
AuthType Basic
AuthName Throttle
AuthPAM_Enabled on
require user admin
</Location>

Haze
09-26-2001, 06:58 PM
Ok, thanks for your help, I will just figure it out on my own. Much appreciated!

nexzt
09-26-2001, 09:50 PM
But that only allows the user "admin" and not specific users, say you want to give a client.. you have to A change it to their siteadmin account or B, create a list using .htpasswd

searley
09-27-2001, 02:42 AM
i prefer it so that only admin can use the /throttle-status page..

any one else has access to the /throttle-me from the throttle me page, the can not reset anything!!