LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-29-2008, 09:20 PM   #1
reddog64
Member
 
Registered: Apr 2004
Posts: 34

Rep: Reputation: 15
Help - need advice


I have a web server i'm assisting a friend with...
It's a cent OS? box. (i'm a windows guy, sorry)

It's been years... ( i last logged in in 2004 here ) since i've used linux...

It's slowly coming back however...

i do have access via webmin. and it's a virtual server, so i have root / ssh

I need to host 3 - 4 sites, nothing professional, mostly just stuff for friends.

I need to know the proper way to work with the users... meaning... when i create virtual servers (in apache using webmin) it's asking for the directory - /var/www/html/sitename being the example i found on google...

how do i create users so they can map their directory and manage their own stuff... so the securities on the directory are set correctly for hosting... so apache can read etc... do i create a user called site1, and create a /var/www/html/site1 and give this user access to this directory?
I need several directories
/var/www/html/site1
/var/www/html/site2
etc


I'm more confused as to the proper way to do this vs how to do it...

thanks guy's
 
Old 01-29-2008, 10:44 PM   #2
Micro420
Senior Member
 
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Rep: Reputation: 45
Not sure how to do it via Webmin, but it's really not hard doing it by editing the /etc/httpd/conf/httpd.conf file.

If you use VirtualHosts, then yes, you can grant ownership to the specific user/group so that they can modify their webpage.

One option would be to enable Home Directories. You can enable home directories and change the paths. Just make sure that each user owns that directory. By default, once you enable the user home directory, it will be in /home/username/public_html. People can then access the site by using the username. For example, http://mysite1.com/~joeblow

Yes, you can give permissions to the folder to the specific user and/or group to access the site. Or you can use the AuthType Basic directive to enable users/groups to login to access the site by granting them a password. YOu can also allow/deny from specific networks.

Last edited by Micro420; 01-29-2008 at 10:50 PM.
 
Old 01-29-2008, 10:48 PM   #3
reddog64
Member
 
Registered: Apr 2004
Posts: 34

Original Poster
Rep: Reputation: 15
OK..
So here's what i did...

i created users in webmin
user1 home dir /var/www/html/site1
user2 home dir /var/www/html/site2
user3 home dir /var/www/html/site3

in apache i created 3 virtual sites

site1 - html doc dir /var/www/html/site1/www
site2 - html doc dir /var/www/html/site2/www
site3 - html doc dir /var/www/html/site3/www

i checked the permissions and it seems that user 1 has permissions on it's home dir, and apache has permissions ponly on the /site1/www part

This seems correct to me...

Is this correct?
 
Old 01-30-2008, 01:17 AM   #4
Micro420
Senior Member
 
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Rep: Reputation: 45
when I meant permissions, I meant changing it on the filesystem.
For example:

Code:
chown user1:user1 /var/www/html/site1
chmod -R 775 /var/www/html/site1
 
  


Reply



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
Need advice! IzoldaYoung General 11 03-01-2007 06:49 PM
Need advice LisumiYoko General 4 02-28-2007 07:07 AM
Need Help and advice mickeyboa General 3 10-14-2006 12:27 PM
Advice Please zipporah Linux - General 1 11-17-2003 07:21 PM
some advice please gnu noob Linux - Software 7 03-26-2003 05:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:56 PM.

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