LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-28-2006, 06:26 AM   #1
battouchan
LQ Newbie
 
Registered: Jul 2006
Posts: 3

Rep: Reputation: 0
Web Server and FTP File Structure


Hi,

Im trying to set up a shared webserver with FTP access. I want multiple websites with multiple ftp users (no shell login). I am a relative noob to linux but have been working with apache on windows for a while.

The server is running Fedora Core 5 and i have set up apache, vsftp and webmin.

I'm trying to decide what file structure to use for these hosted sites. And have come up with these two:

1. Per User

users home is /home/webs/username

and each of the user's websites are under /home/webs/username/domain1.com

2. Per Site

sites are stored at /var/www/domain.com

ftpusers are created at /home/ftpusers/username/


Now the problem i have is if i choose the 2nd option ill have to link the users home diretory to the website (symlink maybe?).

Alternativley could i set the home directory of each user to /var/ww/domain.com? but that will result in one site per user.

I might be going about this all wrong, but any advice or suggestions would be greatly appreciated.

Thanks in advance

Ste
 
Old 07-31-2006, 10:33 AM   #2
zaichik
Member
 
Registered: May 2004
Location: Iowa USA
Distribution: CentOS
Posts: 419

Rep: Reputation: 30
I guess the decision on whether the webs would be on /home or /var depends largely on your partioning scheme and the anticipated size of the webs. One common scheme on a shared hosting box is the users' home directories (including their FTP root) is at

/home/username

and the website would be at

/home/username/public_html

Additional websites for a user could be at

/home/username/public_html/domain2.com

and so forth. This would be similar to the first option you are considering. It has the advantage of ease of use--users can upload files via FTP directly to their web space, and you do not need to worry about the extra step of linking directories.
 
Old 08-02-2006, 12:13 PM   #3
battouchan
LQ Newbie
 
Registered: Jul 2006
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for your reply.

Im not quite sure on the partitioning i have (someone else whos not so forthcomming with information partitioned it for me), fdisk gives this.

Quote:
fdisk -l

Disk /dev/sda: 81.9 GB, 81964302336 bytes
255 heads, 63 sectors/track, 9964 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 fd Linux raid autodetect
/dev/sda2 14 9964 79931407+ fd Linux raid autodetect

Disk /dev/sdb: 81.9 GB, 81964302336 bytes
255 heads, 63 sectors/track, 9964 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 13 104391 fd Linux raid autodetect
/dev/sdb2 14 9964 79931407+ fd Linux raid autodetect

Disk /dev/md1: 81.8 GB, 81849679872 bytes
2 heads, 4 sectors/track, 19982832 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md1 doesn't contain a valid partition table

Disk /dev/md0: 106 MB, 106823680 bytes
2 heads, 4 sectors/track, 26080 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md0 doesn't contain a valid partition table
Apart from partitioning, are there any pros and cons to doing it either way. (/var or /home) or is it simply down to preference?

Thanks again

Ste
 
Old 08-02-2006, 04:02 PM   #4
benjithegreat98
Senior Member
 
Registered: Dec 2003
Location: Shelbyville, TN, USA
Distribution: Fedora Core, CentOS
Posts: 1,019

Rep: Reputation: 45
Code:
df -h
"df -h" will give you a your partitions and sizes.

I would say it is preference. I'm considering starting a hosting service and the way I intend on doing it is /home/username/public_html/www.domain.tld/ .

That way a user can have multiple domains under a single username.
 
Old 08-03-2006, 03:19 AM   #5
battouchan
LQ Newbie
 
Registered: Jul 2006
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks,

df gives this

Quote:
df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/OS-Root 73G 1.7G 68G 3% /
/dev/md0 99M 11M 84M 11% /boot
tmpfs 501M 0 501M 0% /dev/shm
I take it that means i have 1 large partition for everything.

I think ill stick with the /home/username/ way as there seems to be less messing around granting permissions to directories outside of the users home.

Thanks

Ste
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ftp(through web site access to ftp server) kelper Linux - Software 4 07-03-2015 05:14 PM
Sending a file to a web server via ftp mrobertson Programming 11 07-06-2005 09:12 AM
Configuring the tree structure of a web server with apache2?? AQG Linux - Software 7 06-30-2005 03:47 PM
Best Distro for web/file/ftp server jess1975 Linux - Networking 12 04-01-2005 05:16 AM
Good distro for network/file/print/ftp/web server... AudioMechanic Linux - General 3 03-09-2005 10:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:37 AM.

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