Author Topic: VirtualHost ignores mod_shaper  (Read 6548 times)

Offline ricardus

  • New user
  • *
  • Posts: 3
    • View Profile
VirtualHost ignores mod_shaper
« on: May 28, 2011, 07:39:55 am »
Hi!

I installed ProFTPD with mod-shaper and everything worked out as it should.

But when I add a VirtualHost, only the main server gets shaped. The VirtualHost gets to upload and download at full speed...

I use this basic configuration for the VirtualHost:

<VirtualHost mydomain.com>
   Port               2022
   <Limit ALL>
      AllowUser       usera
      DenyAll
   </Limit>
</VirtualHost>


Is there anything I have to add to make it work?

Running proftpd with delug level 10 shows no errors. The only error I could find was this one (in /var/log/ftpd/shaper.log):

error removing queue ID 98307: Operation not permitted

It shows up only when I connect to the VirtualHost, not when I connect to the main server...

Offline ricardus

  • New user
  • *
  • Posts: 3
    • View Profile
Re: VirtualHost ignores mod_shaper
« Reply #1 on: May 28, 2011, 07:45:50 am »
Hit Submit without wanting too...


When connected to the main server, I get

clearing queue ID 98307 of messages for process ID XXXXX

which is - I suppose - what I should getting...


I'd really appreciate any help on the subject.


Regards

ricardus

Offline ricardus

  • New user
  • *
  • Posts: 3
    • View Profile
Re: VirtualHost ignores mod_shaper
« Reply #2 on: May 28, 2011, 02:45:09 pm »
/facepalm


After spending over 48 hours with this problem (at first, I thought that the shaper wasn't working at all since I didn't have a main server configured), I found out that while the ShaperAll directive can't be set on a VirtualHost basis (I tried putting the entire mod_shaper configuration inside the <VirtualHost> tag), you actually can (and, in my case, have to) turn the shaper on (or off) inside every VirtualHost.

<VirtualHost mydomain.com>
   Port               2022
   ShaperEngine       on
   <Limit ALL>
      AllowUser       usera
      DenyAll
   </Limit>
</VirtualHost>


does exactly as it should. Finally! ;D

 

sighted planning