Announcement Announcement Module
Collapse

myhosting.com Forum Guidelines

Welcome to the myhosting.com Forums! The purpose of this forum is to allow you to discuss topics relating to hosting and topics of interest with other myhosting.com Customers. The primary focus should relate to issues not generally included in our Wiki or Control Panel, or information not provided by our Customer Support Team. Some examples include programming and coding support, web site design ideas and SEO practices.

The forum is not meant as a replacement to our Wiki or Customer Support. We highly recommend searching our Wiki before posting on the forum. Also, if you have a question for our Customer Support team, please contact them as you would normally.

We ask that if you have any complaints or questions relating specifically to your account, that you address them to our Customer Support department. Do not post personal account information such as passwords or other sensitive and private information the forum, as this type of information is best kept secret. Also, please be respectful of other users and refrain from defamatory comments or use of coarse language.

We will visit the forum from time to time, and contribute to various topics. We reserve the right to delete any posts which are deemed offensive or against the spirit of the forum. Any spamming or illegal activity will not be tolerated. We also reserve the right to block any user who violates these guidelines.

To get started, we welcome you to sign up at our User Management site. Any account created there will have access to these forums, our Wiki, our Ideas site and commenting permission on our Status Blog.
See more
See less
Configuring mod_limitipconn.c Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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

    Comment


    • #3
      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?

      Comment


      • #4
        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>

        Comment


        • #5
          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.

          Comment


          • #6
            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

            Comment

            Working...
            X