
|
View Full Version : Free automated webhosting code
cperciva 02-27-2002, 07:08 AM Since nobody seems interested in buying this code (http://www.webhostingtalk.com/showthread.php?s=&threadid=26182) I've decided to give it away for free (http://www.webhostingtalk.com/showthread.php?s=&threadid=29419).
Well, almost for free. You don't have to pay be any money, but if you use this code you have to give me free web hosting if I need it, up to a maximum of 1% of your revenue from servers on which you use my code.
Practically speaking, I'm not likely to use said web hosting, but I don't want to end up paying to be hosted with a company which is using code I gave them for free. ;)
Before anyone asks, this code is *FreeBSD only*.
PS. Stupid vB won't allow me to attach a .tgz file. I've renamed it to .tar, but remember that it's actually a tgz and must be gunzipped first.
Starhost 02-27-2002, 07:48 AM Thanx for making the source opensource. I've got 1 question in the readme it says that a script will measure bandwidth per vhost. Which script is doing that?
If I know this I can rebuild it to PHP and then distribute it for free (ofcourse). Because a good bandwidth measuring tool for virtualhostst is needed!.
Thanx in advance.
cperciva 02-27-2002, 07:53 AM Originally posted by Starhost
Thanx for making the source opensource.
I didn't do that. This code is (almost) free beer, but not free speach (in RMS' language).
You may use this code, but I haven't given anyone permission to redistribute it in any form.
Starhost 02-27-2002, 08:37 AM OK, sorry for that. Then I'll start creating my own programm from scratch.
cperciva 03-01-2002, 08:08 AM In a different thread, MotleyFool wrote:
What does it automate? I dont mind paying a reasonable price for it if I find it useful... BTW, I am using FreeBSD 4.4 and djbdns and qmail as I wasn't interested in going for Linux or BIND [which looks inordinately complex after seeing tinydns] just for the sake of a control panel
Well, it can automate more or less everything, if you want it to.
A bit of history: About a year and a half ago I was looking for web hosting, and I didn't like the idea of fixed plans. I wanted flexibility: I wanted to be able to use as much or as little disk space, bandwidth, and cpu time as I wanted, as long as I paid for them. In short, I thought web hosting should operate the same way as utilities do: You don't sign a contract with your power company saying that you'll pay for x KWH of electricity each month, you use however much you use and then pay a fixed rate based on that usage. People told me it would be too hard to implement. So I implemented it. This is the result.
Basically, when you install the code, you edit a file to set various variables, including the rates at which bandwidth, disk space, and cpu time are charged. For example, you might decide to charge $2/GB of bandwidth, $0.50/GB-day of disk space, and $0.15 per minute of CPU time. (At the same time, you also provide information like what IP addresses you're using, what your domain name is, etc.)
The code is designed to work with Paypal. People can sign up through a cgi script; they make a payment through paypal, and their account is automatically created. They can then log in to a different cgi script, where they can create domains, users, and email addresses.
At the end of each day, my code calculates how much bandwidth/disk space/cpu time each person used, and deducts it from their account. When their account balance gets low, they get warning emails, and eventually the account will be disabled if they don't send more money.
All this is automatic. If it weren't for the issue of handling user support questions, it would be quite possible for the server to run itself for months at a time, creating new accounts, accepting money, disabling accounts when money didn't get paid, etc.
There's also a few bonuses in my code which you'll not find generally available; for example, people log in via SSH/FTP/POP3 as user@domain, which avoids the common problem where two different people both want to have the "webmaster" user name; anyone who tries to spam will find themselves limited by code which restricts emails/day to 100 per $ of account balance (think of it as a one cent/email deposit, which would be forfeited if the account is cancelled due to spam); and I've also thrown in a rather customized set of MRTG graphs.
Of course, if you really want you can pull individual pieces of the code out and use them on their own; but I'm not sure how easy that would be. And, of course, you still have to 1. tell me that you're doing this, and 2. provide me with free web hosting if I need it.
Does that answer your question?
MotleyFool 03-01-2002, 09:01 AM Hey cperciva,
It more than answers my question... I remember seeing a site somewhere BSD???host.net or something with exactly the same idea.
I selected FreeBSD , qmail & djbdns after evaluating so many options and I am very very heartened to see some one of your knowledge vindicating it! [It was a hard choice between OpenBSD 3.0 and FreeBSD 4.4 because with softupdates OpenBSD 2.9 + is that much faster and a very strong competing choice for FreeBSD]
Unlucky for you, I didn't see your earlier post since I might have been tempted to cough up the 300$ ... but I have a fairly good server with less than 10% resource utilisation so you are always welcome to utilise as much of my server resources as you may reasonably need !
I have enjoyed the depth of your posts and I have been wanting to email you all these days and I will use this as an excuse to establish contact....
Cheers Mate!
:beer:
MFool
allera 03-01-2002, 09:56 AM I've downloaded the code and looked through some of it and it looks great. What I didn' t see was any kind of control panel for the customers to use. Does it come with one? Where is it at (in case I missed it)?
cperciva 03-01-2002, 01:27 PM Originally posted by MotleyFool
It more than answers my question... I remember seeing a site somewhere BSD???host.net or something with exactly the same idea.
bsdwebhosting.net. It's my code (well, an earlier version of my code) which is running that; back when I was at the stage of complaining that such a web host didn't exist, someone told me that if I could write the code, he would start a company to use it. Despite a number of expressions of interest, they are the only company which has actually paid for the code.
[It was a hard choice between OpenBSD 3.0 and FreeBSD 4.4 because with softupdates OpenBSD 2.9 + is that much faster and a very strong competing choice for FreeBSD]
My choice was largely made by the fact that FreeBSD supports multiple processors. For a uniprocessor system (if I wasn't using code which was written specifically for FreeBSD, as this code is) I would very likely pick OpenBSD.
cperciva 03-01-2002, 01:28 PM Originally posted by allera
I've downloaded the code and looked through some of it and it looks great. What I didn' t see was any kind of control panel for the customers to use. Does it come with one? Where is it at (in case I missed it)?
www/manage.cgi
(at least, that's the front-end. Back-end stuff is done via code in bin.)
cperciva 03-07-2002, 08:36 AM (Yep, I'm resurrecting this thread briefly; I hope nobody minds.)
Is anyone actually using my code? I see that it has been downloaded 68 times, but so far I haven't received a single email telling me that anyone is using it.
CD Burnt 03-30-2002, 09:14 PM Originally posted by cperciva
Despite a number of expressions of interest, they are the only company which has actually paid for the code.
cperciva, whay the change from "I" and "we" WRT bsdwebhosting.net, to "they"?
I thought that was your hosting website, since you promoted it here last year. Did you sell it, or sever your ties?
What is your opinion of bsdwebhosting.net? Do you think they are going to be around for a long time? And reliable?
cperciva 03-31-2002, 02:16 AM [grumble grumble thread resurrections grumble grumble off topic grumble grumble]
I promoted bsdwebhosting.net briefly because it was using my code and I wanted to prove to myself that it would be successful. My ties with it were only ever as coder; I never owned it.
My opinion of bsdwebhosting.net? I haven't had any contact with them for months, so it would be unfair for me to say anything.
Jake29 03-31-2002, 04:13 AM Has anyone else had a problem w/ this tar file. I am very interested in perusing the scripts, but here's the trouble:
#tar -xvf saw102.tar
tar: This does not look like a tar archive
tar: Skipping to next header
tar: 235 garbage bytes ignored at end of archive
tar: Error exit delayed from previous errors
Any ideas?
Jake29
cperciva 03-31-2002, 04:53 AM Originally posted by Jake29
Has anyone else had a problem w/ this tar file. I am very interested in perusing the scripts, but here's the trouble:
Originally posted by cperciva
PS. Stupid vB won't allow me to attach a .tgz file. I've renamed it to .tar, but remember that it's actually a tgz and must be gunzipped first.
CD Burnt 03-31-2002, 06:30 AM Originally posted by cperciva
I promoted bsdwebhosting.net briefly because it was using my code and I wanted to prove to myself that it would be successful. My ties with it were only ever as coder; I never owned it.
hmmm. ok.
|