httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boyle Owen" <Owen.Bo...@swx.com>
Subject RE: [users@httpd] RE: more than 1 user can access site even if MaxClients = 1
Date Fri, 26 Nov 2004 09:19:42 GMT
> -----Original Message-----
> From: Charles Agaton [mailto:agatoncharles@yahoo.com]
> Sent: Freitag, 26. November 2004 08:51
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] RE: more than 1 user can access 
> site even if
> MaxClients = 1
> 
> 
> thanks axel. is there a way to limit the number of
> clients that can access the website? im trying to
> limit the site so that only 5 users(with different ip
> addresses) can access it. perhaps after 10 minutes of
> inactivity of a client another user(with a new ip
> address) who wishes to access the site can replace
> that idle client.

You are misunderstanding how HTTP works. It is a stateless protocol -
like the postal system, rather than the phone system. So your question
sounds like, "how can I limit my letterbox so that only 5 people can
send me letters?" 

Nevertheless, there is a way to make HTTP appear stateful and that is to
use cookies. Basically, a user is given a small chunk of data (cookie)
on his first request and he must resubmit this with every subsequent
request. Each time he comes back, you check the cookie and so know who
it is. If you don't hear from him for say 10 minutes, you mark him as
"gone away" so if he comes back after that, you deny him access.

You control the number of clients by controlling the number of cookies
you hand out - so if you never have more than 5 live cookies out at any
one time, you'll never have more than 5 clients.

Obviously, this kind of approach requires considerable server-side
intelligence - but there are many custom-built solutions available.
Which you use depends on what server-side technology you have: CGI, PHP,
ASP, JSP etc.

Rgds,
Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored. 

> 
> --- Axel-Stéphane  SMORGRAV
> <Axel-Stephane.SMORGRAV@europe.adp.com> wrote:
> 
> >  They do not access the server simultaneously. The
> > server first serves the request from one client, and
> > then the request from the other.
> > 
> > The MaxClient only determines the maximum number of
> > server processes forked to handle requests. The
> > worse thing that can happen if you run out of server
> > processes is that requests will queue up waiting for
> > an available process, and if a sufficient number of
> > requests get queued, additional requests will be
> > rejected.
> > 
> > The maximum number of requests that can pile up is
> > determined by the value of ListenBacklog.
> > 
> > -ascs
> > 
> > -----Message d'origine-----
> > De : Charles Agaton [mailto:agatoncharles@yahoo.com]
> > 
> > Envoyé : vendredi 26 novembre 2004 06:05
> > À : users@httpd.apache.org
> > Objet : [users@httpd] more than 1 user can access
> > site even if MaxClients = 1
> > 
> > have i configured my httpd.conf properly? the
> > MaxClients has been set to 1 yet testing showed that
> > more than 1 client can access the site.
> > 
> > ServerType standalone
> > ServerRoot "/usr/local/apache"
> > PidFile /var/run/httpd.pid
> > Timeout 300
> > KeepAlive On
> > MaxKeepAliveRequests 100
> > KeepAliveTimeout 900
> > MinSpareServers 2
> > MaxSpareServers 5
> > StartServers 2
> > MaxClients 1
> > MaxRequestsPerChild 0
> > 
> > 
> > 		
> > __________________________________
> > Do you Yahoo!? 
> > Yahoo! Mail - Helps protect you from nasty viruses. 
> > http://promotions.yahoo.com/new_mail
> > 
> >
> ---------------------------------------------------------------------
> > The official User-To-User support forum of the
> > Apache HTTP Server Project.
> > See <URL:http://httpd.apache.org/userslist.html> for
> > more info.
> > To unsubscribe, e-mail:
> > users-unsubscribe@httpd.apache.org
> >    "   from the digest:
> > users-digest-unsubscribe@httpd.apache.org
> > For additional commands, e-mail:
> > users-help@httpd.apache.org
> > 
> > 
> >
> ---------------------------------------------------------------------
> > The official User-To-User support forum of the
> > Apache HTTP Server Project.
> > See <URL:http://httpd.apache.org/userslist.html> for
> > more info.
> > To unsubscribe, e-mail:
> > users-unsubscribe@httpd.apache.org
> >    "   from the digest:
> > users-digest-unsubscribe@httpd.apache.org
> > For additional commands, e-mail:
> > users-help@httpd.apache.org
> > 
> > 
> 
> 
> 
> 		
> __________________________________ 
> Do you Yahoo!? 
> The all-new My Yahoo! - Get yours free! 
> http://my.yahoo.com 
>  
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP 
> Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 

Diese E-mail ist eine private und persönliche Kommunikation. Sie hat
keinen Bezug zur Börsen- bzw. Geschäftstätigkeit der SWX Gruppe. This
e-mail is of a private and personal nature. It is not related to the
exchange or business activities of the SWX Group. Le présent e-mail est
un message privé et personnel, sans rapport avec l'activité boursière du
Groupe SWX.

This message is for the named person's use only. It may contain
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this message in error, please notify the sender urgently
and then immediately delete the message and any copies of it from your
system. Please also immediately destroy any hardcopies of the message.
You must not, directly or indirectly, use, disclose, distribute, print,
or copy any part of this message if you are not the intended recipient.
The sender's company reserves the right to monitor all e-mail
communications through their networks. Any views expressed in this
message are those of the individual sender, except where the message
states otherwise and the sender is authorised to state them to be the
views of the sender's company. 



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message