ISPConfig and BandWidth control (mod_cband)

Discussion in 'Tips/Tricks/Mods' started by ecorona, Feb 3, 2006.

  1. pontifex

    pontifex New Member

    Hello,

    you wrote that u add the command manual above the vhost directives. but what happens when u change a setting in the ispconfig backend that causes the httpd.conf to be rewritten? (please test it once..)

    you changes will be gone?! is that correct?

    any help appreciated ;-)

    Ciao
    PM
     
  2. nenad

    nenad Member

    Actually, when I change any setting in ISPConfig

    /etc/apache2/vhosts/Vhosts_ispconfig.conf

    is NOT rewritten. Even if I want to. :eek: HELP !

    This

    Code:
    <CBandClass googlebot_class>
    CBandClassDst 66.249.64/24
    CBandClassDst 66.249.65/24
    CBandClassDst 66.249.79/24
    </CBandClass> 
    can be places in
    /etc/apache2/apache2.conf

    just before this line:

    Include /etc/apache2/vhosts/Vhosts_ispconfig.conf
     
    Last edited: Sep 23, 2006
  3. falko

    falko Super Moderator Howtoforge Staff

    What's the output of
    Code:
    ls -la /root/ispconfig
    ?
    What happens when you run
    Code:
    /root/ispconfig/php/php /root/ispconfig/scripts/writeconf.php
    ?
     
  4. nenad

    nenad Member

    Code:
    server201:~# ls -la /root/ispconfig
    total 124
    drwxr-xr-x   9 root root  4096 2006-09-23 11:54 .
    drwxr-xr-x   9 root root  4096 2006-09-22 23:03 ..
    -rwxr-xr-x   1 root root 54016 2006-05-28 16:51 cronolog
    -rwxr-xr-x   1 root root  9673 2006-05-28 16:51 cronosplit
    drwxr-xr-x  12 root root  4096 2006-05-28 16:16 httpd
    drwxr-xr-x  12 root root  4096 2006-05-28 16:51 isp
    -rw-r--r--   1 root root     8 2006-09-23 11:54 .old_path_httpd_root
    drwxr-xr-x   6 root root  4096 2006-05-28 16:02 openssl
    drwxr-xr-x   6 root root  4096 2006-05-28 16:26 php
    drwxr-xr-x   4 root root  4096 2006-06-29 22:47 scripts
    drwxr-xr-x   4 root root  4096 2006-05-28 16:51 standard_cgis
    drwxr-xr-x   2 root root  4096 2006-05-28 16:51 sv
    -rwx------   1 root root  9389 2006-05-28 16:51 uninstall
    server201:~#
    
    Code:
    server201:~# /root/ispconfig/php/php /root/ispconfig/scripts/writeconf.php
    start
    ende
    server201:~#
    
    And /etc/apache2/vhosts/Vhosts_ispconfig.conf
    is NOT rewritten?
     
    Last edited: Sep 23, 2006
  5. falko

    falko Super Moderator Howtoforge Staff

    The outputs are ok. Are you sure you changed anything in ISPConfig, anything that should be changed in Vhosts_ispconfig.conf?
     
  6. nenad

    nenad Member

    Yes, I deleted mod_cband directives from Apache directives option in ISPConfig, and turned on anonymus FTP, then restarted Apache...
     
  7. falko

    falko Super Moderator Howtoforge Staff

    What's the output of
    Code:
    ps aux|grep wconf
    ?
     
  8. nenad

    nenad Member

    Code:
    server201:~# ps aux|grep wconf
    root      2267  0.0  0.4  2468 1080 ?        S    Sep23   0:00 /bin/bash /root/ispconfig/sv/ispconfig_wconf
    root     25570  0.0  0.2  1820  568 pts/0    R+   20:13   0:00 grep wconf
    server201:~#
     
  9. falko

    falko Super Moderator Howtoforge Staff

    That's also ok.
    Maybe your disk is full? What's the output of
    Code:
    df -h
    ? Maybe you also need to reboot your system... :confused:
     
  10. nenad

    nenad Member

    System rebooted several times.

    Code:
    server201:~# df -h
    Filesystem            Size  Used Avail Use% Mounted on
    /dev/hda1              18G  4.9G   13G  29% /
    tmpfs                 125M     0  125M   0% /dev/shm
    server201:~#
    
    Is there any chance that saving file as DOS instead of UNIX type, or ASCII or UTF8 conversion caused this problem ?
     
  11. falko

    falko Super Moderator Howtoforge Staff

    Yes, whenever you edit a file on your Windows system and you want to transfer it back to your Linux system, make sure you save it with Unix linebreaks (if you use FTP, the conversion is done automatically).
     
  12. nenad

    nenad Member

    That was the problem.

    Some files I was editing directly with JOE, and some other with UltraEdit through FTP interface. Probably there was problem with codepage or alike, since all files were in UNIX format (linebreaks).

    Anyway, to avoid to much experimetation, I deleted:

    /etc/apache2/vhosts/Vhosts_ispconfig.conf

    and

    I deleted and then created fresh file

    /root/ispconfig/isp/conf/vhost.conf.master

    and now everything works fine.

    These apache directives:

    Code:
    <CBandClass googlebot_class>
    CBandClassDst 66.249.64/24
    CBandClassDst 66.249.65/24
    CBandClassDst 66.249.79/24
    </CBandClass>
    I put into:

    /etc/apache2/apache2.conf

    Code:
    CBandScoreFlushPeriod 1
    CBandRandomPulse On
    
    <CBandClass googlebot_class>
    CBandClassDst 66.249.64/24
    CBandClassDst 66.249.65/24
    CBandClassDst 66.249.79/24
    </CBandClass>
    
    
    Include /etc/apache2/vhosts/Vhosts_ispconfig.conf
    
    
    
    
    
     
  13. nenad

    nenad Member

    Any answer to this?
     
  14. falko

    falko Super Moderator Howtoforge Staff

    You'd have to change the ISPConfig source code (function make_vhost() in /root/ispconfig/scripts/lib/config.lib.php) to change it.
     

Share This Page