Помощь - Поиск - Пользователи - Календарь
Полная версия: Ограничение количества коннектов на VirtualHost
Онлайн-форум hostobzor.ru > Архив (темы до 1.06.2015). Только для чтения. > Коммерческий хостинг. Общие форумы > Выделенный сервер и co-location
DLag
Чем можно ограничить количество соединений к одному VHost-ту?
Нашел два модуля vhost_limit и vhost_pconn, но они для Apache 1.3, а стоит Apache 2.
Чем это можно сделать, потому как один клиент забивает все потоки Апача?

PS: Если выбрал не тот раздел, просьба к модератору перенести тему.
eSupport.org.ua
mod_vhost_limit ?

DLag
У вас есть он под Apache 2?
r2w
http://cband.linux.pl/
Цитата
mod_cband is an Apache 2 module provided to solve the problem of limiting users' and virtualhosts' bandwidth usage. The current versions can set virtualhosts' and users' bandwidth quotas, maximal download speed (like in mod_bandwidth), requests-per-second speed and the maximal number of simultanous IP connections (like in mod_limitipconn)

Оно?
DLag
Нет, это ограничение трафика, а не количества подключений.
Мне нужен mod_vhost_limit или его аналог, но под Apache 2.x
eSupport.org.ua
and the maximal number of simultanous IP connections (like in mod_limitipconn)
DLag
This is the distribution page for the Apache module mod_limitipconn.c, which allows web server administrators to limit the number of simultaneous downloads permitted from a single IP address.

Это ограничение обратное, т.е. ограничивает количество подключений с одного IP, а мне нужно общее количество подключений к vhost, со всех IP.
Т.е. чтобы к одному сайту могло одновременно подключится определенное количество пользователей.
Остальные либо стояли в очереди, как это делает Апач при полной загрузке, либо получали 503, первое предпочтительней.
r2w
Я не проверял, но ведь пишут
Цитата
and the maximal number of simultanous IP connections (like in mod_limitipconn)

DLag
Цитата(r2w @ 04.05.2007, 18:29) *

Я не проверял, но ведь пишут

Смотри выше.
r2w
Ну тогда вот: http://www.ivn.cl/apache/ smile.gif
DLag
Видел, только под Apache 1.3
r2w
Цитата(DLag @ 05.05.2007, 01:49) *

Видел, только под Apache 1.3

Так посмотрите еще и для 2-го.
Код
/*
*
* Author           : Ivan Barrera (Bruce) <Bruce@Ivn.cl>
* Updated          : 2007.04.06
* Status           : Functional
* Current Version  : v0.2
*
* NAME
*     mod_vhost_limit.c
*
* PURPOSE
*       * Restrict the number of simultaneous connections per vhost
*
* HISTORY
*     2007.04.06
*       Included some cleanup, and fixes suggested (and coded by) Chirouze Olivier
*     2004.02.24
*       Initial revision 0.1
*
* IMPORTANT
*
* - This program source code, is free to distribute and use personally. If you
*  like the work i did porting it to Apache 2 , and the new features i'll be
*  implementing on the future, donations will be well received. Im a programmer
*  who is just starting to code for life, so ill need lots of support.
*   How could you cooperate ? I live in Chile. Money orders are good idea,
*  but with high cost. I also have paypal, but i cant withdraw money from here.
*   Postals, a bill (to know money from other countries), or better yet, some
*  job to do online.
*
* - All the software i'll be developing, will be under the same license. Not yet
*  defined, but as soon as its ready, i'll update this files.
*
* - If you use this software commercially, please let me know. A donation is good
*  as with it, i'll be willing to give support, and work more on this modules.
*
* COMMENTS
*
*       If ExtendedStatus is Off, it wont work. Anyways, you'll be warned
*         I was based on mod_vhost_limit from Takato Satsuma <takato@nowhere-land.org>
*       who wrote it for Apache1.3.
*
*         If you run into problems, be sure that ExtendedStatus, is set On before the
*       LoadModule sentence.
*
*
*/
DLag
Ошибка компилятора что-то вроде "его нужно вначале портировать на 2.x"


r2w, спасибо за наводку.
Настроил cband под свои нужны.
Это текстовая версия — только основной контент. Для просмотра полной версии этой страницы, пожалуйста, нажмите сюда.
Русская версия Invision Power Board © 2001-2025 Invision Power Services, Inc.