Top VPS Hosting Provider

Welcome to the myhosting.com Forums.
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    jacu_80 is offline Junior Member
    Join Date
    Mar 2012
    Posts
    3

    Default Configuring mod_limitipconn.c

    Hi,

    I installed this module (dominia.org/djao/limitipconn2.html"mod_limitipconn.c which limits the maximum number of connections per IP address.
    To configure this module I edited /etc/httpd/conf/httpd.conf and turned on ExtendedStatus

    To configure this module all I need to do is to place the following code in httpd.conf and restart httpd service

    Code:
    <IfModule mod_limitipconn.c>
    <Location /videos>
    MaxConnPerIP 1
    </Location>
    </IfModule>
    My problem is that I don't know where to place this code as I have many httpd.conf files. My guess was to edit
    xxxxxxx.xxxxx_httpd.include located in: var/www/vhosts/vps-xxxxxx-xxxxx.manage.myhosting.com/conf/

    Any suggestions?

    Thanks

  2. #2
    suwunk is offline Super Moderator
    Join Date
    Aug 2010
    Posts
    1,081

    Default

    Hi Jacu_80

    On CentOS Linux the main Apache configuration file is located in /etc/httpd/conf/.
    http://myhosting.com/kb/Plesk_VPS_fo..._VPS_Optimized

    Cheers

  3. #3
    jeremya is offline Administrator
    Join Date
    Jun 2008
    Posts
    270

    Default

    It sounds like you're wanting to set it globally. If so, setting it up in /var/www/vhosts/vps-xxxxxx-xxxxx.manage.myhosting.com/conf/ probably won't work as that vhost is one single site in your configuration.

    Are you running Plesk? Which version? In 10.4.4 there are apache module tools that let you turn certain modules on/off automatically. Not sure if that particular mod is in there but it's worth checking.

    Lastly, are you running centos or debian?
    -Jeremya

  4. #4
    jacu_80 is offline Junior Member
    Join Date
    Mar 2012
    Posts
    3

    Default

    I am running Plesk v10.4.4 on Centos.
    So your suggestion is to set the configuration inside the Apache configuration file (/etc/httpd/conf/httpd.conf)?
    If yes then would I just type in the full path to my videos direcotry as follows?

    Code:
    <IfModule mod_limitipconn.c>
    <Location /var/www/vhosts/vps-xxxxxx-xxxxx.manage.myhosting.com/mysite/videos>
    MaxConnPerIP 1
    </Location>
    </IfModule>

  5. #5
    jeremya is offline Administrator
    Join Date
    Jun 2008
    Posts
    270

    Default

    Well, when you put it that way, it sounds like you actually are only concerned with on particular site. I would do two things:1) Check that module is getting successfully loaded into apache. To verify, check your Plesk Apache settings at https://your-server-ip:8443/admin/se...ation-settings, you should be able to see your mod in that list and checked assuming its properly installed and available to Apache.
    2) Then i would try it in the vhosts section as you mentioned originally, if that fails, try it in the main apache config.
    That said, I am largely guessing, i would refer to the documentation on the module for best advice when using vhosts.
    -Jeremya

  6. #6
    jacu_80 is offline Junior Member
    Join Date
    Mar 2012
    Posts
    3

    Default

    Ok, here is what I found out.
    Even through the module is installed and working properly, it doesn't show in the control panel.
    To get the module working, I ended up doing all the configuration in the /etc/httpd/conf/httpd.conf, and I added the following code inside the same file.

    The location tag has '/' so that it only allow for 15 connections per IP address on all directories except for images.

    Code:
    <IfModule mod_limitipconn.c>
    <Location />
    MaxConnPerIP 15
    NoIPLimit image/*
    </Location>
    </IfModule>
    Thanks


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts