• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

How can I provide web hosting with Apache?

BustAcap

Member
I want to host multiple sites on my machine... What would be the best way to go about setting this up? I want to be able to:

1) Limit bandwidth and space usage per account.
2) Allow file management through FTP, to use directory.
3) Allow remote telnet access to designated user directory.
4) And all the other nuts and bolts...

I am looking for a site that can provide tutorials and resources to do this... but still unsuccessful. I would really appreciate some help
 
What do you mean by sites, exactly? Have multiple domains? www.foo.com, www.bar.com, etc? Or just www.foobar.com/~user/? For the former, you want virtual hosting (lots of domains, one IP). For the later, look into mod_userdir in Apacher. For space usage, look into quotas. Go here for bandwidth stuff. Or maybe here for info on IP accounting

Virtual Hosts

WU-FTPD Guest HOWTO
tells you how to setup wu-ftpd to use only their directory. I'm not real sure about telnet.

Lots of reading for ya there 😉
 
>> 1) Limit bandwidth
Not real easy to do, at least not on one machine. With a Cisco router you could do this via access lists though. On Linux you could look into the QoS stuff, but I don't think this works with IP Aliased devices, that is if you're going to IP based virtual hosting. Certainly won't work on a account basis with name based virtual hosting.

You can limit a lot of things with Apache but bandwidth isn't one of them.

<edit> Ooops. Forgot about mod bandwidth. No idea how well it works though. I had this sneaky feeling somewhere that Apache could do that. The problem here is that it will only limit the bandwidth for Apache serving pages. Not for any other services (e.g. ftp, etc.).</edit>

>> and space usage per account.
Easy enough to do with quotas on any *NIX platform.

>> 2) Allow file management through FTP, to use directory.
VERY easily done with ProFTPD. Easier than with WU and it's much more secure than WU.

>> 3) Allow remote telnet access to designated user directory.
Bad idea in my opinion, but...if you're using a *NIX platform there's a couple of ways to limit what people can do:

a) Install only what you need and run Apache, BIND, sendmail, and any other daemons chrooted. Then setup all these users in one group and make sure all the permissions and groups for commands that they should not be able to run and directories they should not be able to access are appropriate. Too long to get into all the specifics here. FreeBSD has a great advantage here as you can make things immuteable. Means even root can't change that stuff unless you take the machine to single user mode.

b) Look for a program called srsh (Severely Restricted SHell). Bascially chroots users (meaning they can't &quot;back up&quot; out of their home directory because that is their root directory). Quite a nifty little way to go about things.

>> 4) And all the other nuts and bolts...
Like what?
 
Back
Top