How to limit the number of users for a directory with APACHE ?

How to limit the number of users for a directory with APACHE ?

Post by joe » Sun, 28 Apr 1996 04:00:00



Hi !

I would like to limit the number of simultaneously connections to a directory?
How can I Do ??

I have a problem too with the domain identification...

in the .htaccess I put:

AuthUserFile \dev\null
AuthGroupFile \dev\null
....
order deny,allow
deny from all
allow from .sct.fr
...
It allow only from client from sct.fr but ask for a password and a username..
And I would like it allow from sct.fr without ask for a username and a password..
Is it possible ???

Thanks for your help !!
Joey

 
 
 

How to limit the number of users for a directory with APACHE ?

Post by guy ker » Tue, 30 Apr 1996 04:00:00


: I would like to limit the number of simultaneously connections to a directory?
: How can I Do ??

i'm not sure at all this is possible (at least not in the NCSA httpd or
cern httpd). please note that unlike ftp, the connection betweenthe
server and the client is NOT kept between client accesses, so you usually
have a small ammount of users actually connected to your server at the
same time.

if you mean to limit users from downloading large files all at once,  you
may write a cgi program that keeps a counter in some file (using proper
locking), and returning a 'server too busy' message if the counter is too
high.

note that youll probably need to catch SIGPIPE signals, which are
received if the user pressed the 'STOP' button of his/her browser (or if
the connection died in any other way) - i am not sure this is the signal
sent to the cgi program too, so you'll have to check.

: I have a problem too with the domain identification...
:
: in the .htaccess I put:
:
: AuthUserFile \dev\null
: AuthGroupFile \dev\null

why do you define a user/group file at all?
just define the directory's allow,deny options.
don't define any auth-type requirement...
just something like:

<Limit GET POST ..>
order allow,deny
allow from your.domain.fr
deny from all
</Limit>

this seems to be enough.

guy keren

ACTCOM

 
 
 

1. How to limit number of user logins on Apache?

as you're sure to get a flurry of replies like this, HTTP has no sense
of being logged in.  It's a stateless protocol.  Any additions to make
it stateful are pretty much up to you.  

You might be able to start with some of the 3rd party modules at
http://modules.apache.org/ but I'm pretty sure you're gonna have to make
some changes (don't think any of them have concepts of user limits).

As per above, this isn't standard HTTP, it has to be layered on top of
it.
--
---------------------------------------------------------------------
Richard Homolka        Zedo inc.                       (415) 348-1975

2. Instructions needed

3. Is there a limit to the number of files in 1 directory?

4. How to configure independent TCP/IP connections?

5. Realistic limit on number of files in a directory

6. apache 1.3.3 :Error getting local address

7. File number limits per directory(Solaris8)

8. truss?

9. "Performance" limit to file numbers in a directory

10. limit to number of files in a directory?

11. Limit on number of directories under Solaris 2.5

12. Limit on number of files in a directory ?

13. 403 Forbidden - when i try to go to a user directory (~user) in Apache