Why is mod_limitipconn in Ubuntu 8.04 not working?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear David,

I am the administrator of a website, and I found that some users make
lots of HTTP connections to my website. After searching for answers to
this problem, I tried to use your Apache module mod_limitipconn.

However, there is a problem for me to use this module: this module is
not working.

My environment
========================
* Xen VPS, x86_64
* Ubuntu 8.04 hardy
* Apache/2.2.8, 64-bit, prefork MPM (I use the Ubuntu compiled
packages apache2-mpm-prefork 2.2.8-1ubuntu0.2, installed by apt-get)
* mod_limitipconn-0.23
========================

The steps I took to install and use limitipconn.
1. Download the tarball from http://dominia.org/djao/limitipconn2.html
2. I build the source code as an Apache DSO:
   tar xjvf mod_limitipconn-0.23.tar.bz2
   cd mod_limitipconn-0.23
   make
Everything is OK till make done, there are no error messages.
   make install
There is a problem here; it said that there is no "LoadModule" in
/etc/apache2/httpd.conf

I checked this, and found this is because the Apache package in Ubuntu
had modified the default config file. In the default Apache tarball,
the config file is at /usr/local/apache2/conf/httpd.conf; all
configuration settings are stored in this single file.

However, in Ubuntu package, it changes this to another file:
/etc/apache2/apache2.conf. And it splits lots of parts into separated
files in several directories. And use "Include" directive in the
apache2.conf to include these separated files to form one logic config
file as the httpd.conf file in the tarball.

START of fragment in /etc/apache2/apache2.conf
========================
...
# Include module configuration:
Include /etc/apache2/mods-enabled/*.load
Include /etc/apache2/mods-enabled/*.conf

# Include all the user configurations:
Include /etc/apache2/httpd.conf

# Include ports listing
Include /etc/apache2/ports.conf
...
========================
END of fragment in /etc/apache2/apache2.conf

Note, although there is also an "httpd.conf" file here, it is empty by default.

Obviously, the previous error is because it cannot find anything in
this "httpd.conf" file. So I copied the default httpd.conf file in the
Apache tarball (/usr/local/apache2/conf/httpd.conf) here; then run
"make install" again. After that, I diff-ed the httpd.conf files to
see what modifications had been made by the "make install". I found
there were some new lines added. Then, I put *ONLY* the new lines into
/etc/apache2/httpd.conf.

After I changed some settings, the /etc/apache2/httpd.conf.is looks like this:

START of file /etc/apache2/httpd.conf
========================
ExtendedStatus On

LoadModule limitipconn_module /usr/lib/apache2/modules/mod_limitipconn.so

# mod_limitipconn
<IfModule mod_limitipconn.c>
   MaxConnPerIP 3
   <Location />
       MaxConnPerIP 3
   </Location>
</IfModule>
========================
END of file /etc/apache2/httpd.conf

In my opinion, this file will be included by the "Include
/etc/apache2/httpd.conf" statement in the /etc/apache2/apache2.conf
file; so all the directives in it will be seen by Apache daemon.

Then, I started Apache, and there wasn't any error message; everything
seemed to go fine.

However, then I tried to test whether this module was working.
I used the "ab" command to test from my machine:
   ab -n 1000000 -c 100 http://www.myhost.com

Unfortunately, I found on my server that it showed there are 2620 HTTP
connections from my machine. During the ab command was running, I also
tried to visit http://www.myhost.com by FireFox. Here is the error
message that I saw in FireFox:
========================
   503 Service Temporarily Unavailable
   The server is temporarily unable to service your request due to
maintenance downtime or capacity problems. Please try again later.
========================

After I stopped the ab command in my machine, everything went back to normal.

Could you please give me some suggestions on this issue?
Thank you very much. Looking forward to your kindly reply.

-
Yours Truly,
James Z. Snell

---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux