LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-08-2004, 04:37 AM   #1
timmy_laf
Member
 
Registered: Jan 2004
Location: Western Australia
Distribution: Mandrake Linux 9.2
Posts: 78

Rep: Reputation: 15
How do you limit bandwidth on your webserver account with a script???


I know it's possible to limit bandwidth i just don't know how, I want to do it with a .htaccess file or cgi script, help please!!!
 
Old 01-08-2004, 03:15 PM   #2
german
Member
 
Registered: Jul 2003
Location: Toronto, Canada
Distribution: Debian etch, Gentoo
Posts: 312

Rep: Reputation: 30
you could have an approximation of it by creating a simple CGI or perl script to read HTML files in as plain text, record their size, add it to the total size, then send it out, unless the limit has been reached in which case send a 421 Go Away or whatever... this also allows you an extremely easy way to do simple S&R for your pages on the way out the door, to make them semi-dynamic (use perl regexp and some unique token in the static HTML pages). Other than that you could possibly use flow control in iptables or pf (I'm only sure the latter actually has it).

HTH

B.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Vsftpd - how to limit download bandwidth but unlimited upload bandwidth? mpls mikeg Linux - Software 3 08-13-2005 01:52 PM
How limit bandwidth cuencano Linux - Networking 10 07-18-2005 04:57 AM
Limit Bandwidth andy7t Linux - Networking 6 11-30-2004 02:44 AM
apache Bandwidth Limit genexis Linux - General 0 02-18-2004 04:54 AM
bandwidth limit n_sergiu Linux - Networking 5 08-05-2003 05:02 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration