[BlueOnyx:11634] Re: Web Services and Admin funcions
George F. Nemeyer
tigerwolf at tigerden.com
Sat Oct 27 03:16:00 -05 2012
On Sat, 27 Oct 2012, Marcello Torchio wrote:
> My need is to integrate for example the availability of a website
> regarding its billing status, so if the customer doesn't pay the hosting
> renewal bid later the expire date the website will be automatically
> suspended.
You could possibly use Apache mod_cband to do the blocking, and direct to
a page that says 'This domain expired." or whatever you want.
It would simply require writing some config lines into the
/etc/httpd/conf/vhosts/ config file for the site in question, and issueing
a restart to the web server so it sees the new config.
1. Add a CBandLimit directive with a very low (1k) data transfer quota.
That would be exceeded essentially immediately when someone hits the
site.
2. Add a CBandScoreboard directive to create a 'scoreboard' file for
the vsite that keeps the usage and transfer limit information.
3. Add a CBandPeriod directive that sets the 'scoreboard reset' to a very
high number of weeks to keep the site disabled.
4. Place a CBandExceededURL directive that includes the URL of
the 'Domain Expired' page that lives elsewhere. This is what
someone attempting to access the site would get as a re-direction.
These lines could be dropped into the "vsiteNN.include" file by whatever
decides they're overdue.
Once the user pays up, remove the lines, issue a server restart, and
everything's back to normal.
As an alternative, you could use CBand's bandwidth throttling ability to
just slow the site to a crawl rather than blocking it entirely.
If you have transfer quotas (X Mbytes/month) on your sites, CBand can also
keep track of those by time-period, and take various actions (blocking or
slowing the site) when limits are exceeded. It can also apportion
different bandwidth speeds for different sites.
You can look at documentation on how the CBand module works here:
<http://dembol.org/blog/mod_cband/>
=^_^= Tigerwolf
More information about the Blueonyx
mailing list