Apache Directives thing....

Discussion in 'General' started by matrixn, Dec 9, 2009.

  1. matrixn

    matrixn New Member

    Hi everyone,

    I have a ISPConfig 2 installation and today i have installed the mod_cband for apache2, everything is ok when i add the code in Vhosts_ispconfig.conf before the </VirtualHost>, but if i try to add the code using Apache Directives from ISPConfig admin panel... it seems that the code is inserted right after <VirtualHost xx.xx.xx.xx:80> and this is giving me this error "Starting httpd: [warn] Invalid command 'CBandSpeed', undefined virtualhost name" like ServerName directive is not set.

    My question is ... there is a way to add the following code after the ServerName directive as is told in the tutorial here http://www.howtoforge.com/mod_cband_apache2_bandwidth_quota_throttling_p2?


    Code:
      CBandLimit 100M
      CBandExceededSpeed 128 5 15
      CBandScoreboard /var/www/scoreboard
      CBandPeriod 4W
    
      <Location /cband-status>
        SetHandler cband-status
      </Location>
      <Location /cband-status-me>
        SetHandler cband-status-me
      </Location>
    

    P.S. I`m sorry for my bad english :(
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Never edit Vhosts_ispconfig.conf manually, all your changes will get removed automatically! Add the code in the apache directives field of the website instead.
     
  3. matrixn

    matrixn New Member

    yes, i known.. that the changes are automatically removed by ispconfig but. i was just saying that it works if i add the module directives under the ServerName directive. The problem is that ispconfig puts the optional apache directives right before the ServerName directive... there is a way to put them after?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    What might be working is if you try to add the servername directive a second time in the apache directives field together with your code.
     
  5. matrixn

    matrixn New Member

    i have do it that way.. but i have 2 server names directive ..but it works

    Thanks for making time for this post!
     

Share This Page