Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> Multi User Web Server / Web Hosting, How do i create one?
champi0n
post Mar 27 2004, 10:49 PM
Post #1


Whats this Lie-nix Thing?
*

Group: Members
Posts: 1
Joined: 27-March 04
Member No.: 2,667



Hi, What im tring to do is set up a multi user web server / hosting

I looked at the guide http://www.linuxhelp.ca/guides/mdvh/ but was unable to figure out what was going on.

I have apache installed and working, and im hosting a few of my own sites just fine. As well i have the virtual hosts directing to different directories etc.. I think i do want to set up my virtual hosts as in the guide, but i also want other options.

So if anyone is able to help me, or point me in the right direction; this is what i want:
- a script/interface where it will prompt me for the following options

USERNAME
//create the user name under a default directory (ie. http/users/~username)

PASSWORD
//create the password for the user
RETYPE
//retype the password...

LIMIT SIZE
//the size or disk quota (in MB) that the user directory cannot excede (or have this defaulted to a certian size?)

URL
//ie (www.url-here.com) would create the virtual host and point at the users directory

I guess that would be it... basically the main part would be to add virtual hosts without me having to go in and edit the file manually all the time (and im assuming thats what the guide is about, but i cant figure out how it would work)

Also if anyone thats reading this knows how to set up a DNS server, and what i need to do so, please help with that as well. (i think i need 2 ips to do that?) but where and how would i set up the file in linux?

Thanks very much for any help.
Go to the top of the page
 
+Quote Post
Termina
post Mar 29 2004, 02:12 PM
Post #2


RMS is my Hero
******

Group: Support Specialist
Posts: 862
Joined: 18-February 04
From: Wisconsin
Member No.: 2,404



This is how I have mine set up:

Registration page (php): Asks for username, password, and description of site. The account is made (/home/$username) and in /etc/skel I have put a "public_html" directory with an empty index.html file, along with a .plan file (in their home directory, not in public_html).
(I'll post the code here when I get home from school for you).

Memeber Page: Displays the content of each person's .plan file, so they are able to update their site description without going to you for it. Not major, just nice to have.


httpd.conf: make sure "UserDir=~/public_html" is uncommented.


Now, the obvious problem is that if you want the world to view these things from the web, how are you going to stop these people from looking at each other's files, and changing them.

There are a few ways to do this, these three are IMHO the best:
1) Allow only FTP access, chroot them into their home directory (ProFTPD is great)
2) If you allow them SSH, get openSSH. Have them auto-chrooted in their home directory.
3) Apache probally runs under the user "nobody", so make a group called nobody, and add "nobody" to it. Edit your profile file and make sure that when a file is created, the group owner is nobody, and the permissions of the file are 750 (or 0750). That should allow people surfing the web to view these files, while other users that are logged in cannot. Make sure that your /home directory is owned by group nobody, and change it's permission to 770 (so users are unable to "ls" in it).

Now your users should be able to sign up for an account, have their files viewable (or not viewable, if the file is outside of the public_html directory), and it should be a safe enviorment.


Now what you probally want is subdomaining. (That or Virtual Directories... basically the same thing)
http://domain.com/~user looks a bit ugly, doesn't it? happy.gif

Here is a useful site that should take care of it.
(unfortuantly I'm unable to do this, since my domain name IS a subdomain... bah)

http://list.cobalt.com/oldlist/cobalt-user...s/msg03012.html

Regarding the limiting size that each person can have... I'm not sure, sorry. =/ I too would love to know how to do this short of having several gigs of unallocated space, and on signup it creates a small partition for each user. happy.gif

Hope this was helpful! If you have any other questions, I'd love to help you out.


--------------------
*Points finger at the author above him* They're a witch! Burn them!
---
Vist my website!
Join me in IRC! Server: st0rage.org Channel: #UnhandledExceptions
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 17th December 2017 - 05:06 AM