Limit Bandwidth per Apache Virtual Host [closed]

假如想象 提交于 2019-12-03 14:04:59

问题


I'm going to launch a 2GB Linode VPS to host a couple of Wordpress CMS sites and one based on Yii framework. I planned on using Apache virtualhosts to assign each site it's own webroot on a user's home directory instead of leaving everything in /var/www

Is it possible to limit the bandiwdth allocated to each Apache virtualhost? I was planning on using Debian Squeeze or CentOS for this box. Not that I envision any of the sites maxing out the 4TB of bandwidth allocated from Linode but it just seems like good practice.

I think using a VPS is the best option as none of the sites are particularly large and the cost of using a PaaS seems a bit much for a few simple CMS sites and a lightweight Yii app.

Also - I know this is subjective and somewhat against the rules here - but is Debian particularly easy to use compared to CentOS for a newbie? Linode have an extensive guide on their Wiki about launching and running a CentOS server but I'm sure there are equally as good guides out there in the wild for Debian?

Thanks in advance for any advice :)


回答1:


There are several modules for Apache to limit the total bandwidth for each website. A well known one is mod_bw. Here are some good tutorials on how to set it up:

  • http://www.gavinwill.me.uk/2012/09/limit-apache-bandwidth-with-mod_bw/
  • http://linuxpoison.blogspot.tw/2012/02/setup-and-configure-bandwidth-limiting.html
  • http://www.pwrusr.com/system-administration/apache-mod_bw-for-virtualhost

Here are the modules that I'm aware of which perform bandwidth limiting:

  • mod_bw
  • mod_bandwidth
  • mod_cband


来源:https://stackoverflow.com/questions/17009248/limit-bandwidth-per-apache-virtual-host

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!