Koozali.org: home of the SME Server

hosting multiple sites with SME?

innorevtech

hosting multiple sites with SME?
« on: July 17, 2006, 04:42:59 PM »
i am still trying to grasp the depth and breath of SME's capabilities, which has led to this post....

easy one: can the SME host multiple websites? (i am going to assume: Yes)

scenario:
IP address 123.123.123.123
site #1 "mywebsite"
site #2 "myfriendssite"

should they be hosted in the SAME ibay (ie: Primary) or 2 (or more) seperate ones?

if using 2 seperate ibays and the same static IP can they be accessed by http://123.123.123.123/mywebsite/ and http://123.123.123.123/myfriendssite/ respectively? - is there any special configuration needed for this?

how do you seperate SSH/FTP users for these two sites/ibays?

any and all help/clarification is much appreciated.

Offline mmccarn

  • *
  • 2,656
  • +10/-0
hosting multiple sites with SME?
« Reply #1 on: July 17, 2006, 06:09:36 PM »
Your problem sounds more like straight ibays - you're referencing the server by IP address, not domain name, so the virtual domains don't kick in -

Just setup 2 ibays - one for "mywebsite" and one for "myfriendssite".

Once you've set them up, give them passwords and configure ftp access as you want (local net, entire world, etc)

Then, your ibay is available using user="mywebsite", password=whatever you set and your friend's ibay is available using user="myfriendssite", password=whatever you picked for him/her

Virtual domains expand on this as follows:

1. Make DNS for "www.my-friends-domain-name.com" point to the public IP on your server
2. Create the virtual domain on your server, and set the contents to the ibay "myfriendssite"

Now, anyone who gets the right IP address when they "ping www.my-friends-domain-name.com" can pull up your friends site at *either* http://www.my-friends-domain-name.com *or* http://123.123.123.123/myfriendssite

innorevtech

hosting multiple sites with SME?
« Reply #2 on: July 17, 2006, 06:13:19 PM »
ok sounds good...
one thing to add though, some Domain Name prodivers allow you to configure www.mywebsite.com as -> http://123.123.123.123/mywebsite/

which is what i was hoping to do; i'll give it a try tonight and see what happens.

innorevtech

hosting multiple sites with SME?
« Reply #3 on: July 17, 2006, 06:26:58 PM »
Just thought of something... how does the SME differentiate between an ibay called "mywebsite" and a subfolder in ibays/Primary/html/ called "mywebsite"?

if you are accessing by direct IP address http://123.123.123.123/mywebsite defaults to the Primary ibay (maybe i am wrong). is there a conflict if you have both? does one take precidence over the other?

Offline wjhobbs

  • *****
  • 171
  • +0/-0
    • http://www.chryxus.ca
hosting multiple sites with SME?
« Reply #4 on: July 17, 2006, 09:05:52 PM »
To clarify...

123.123.123.123/ and 123.123.123.123/Primary/  both take you to the same place.

If you have an ibay called 'mywebsite' (different from Primary) you get to it at 123.123.123.123/mywebsite/. If you have another ibay called 'myfriendssite' he/she gets at that by going to 123.123.123.123/myfriendssite/.

Hope this helps.
...

Offline Boris

  • *
  • 783
  • +0/-0
hosting multiple sites with SME?
« Reply #5 on: July 17, 2006, 09:23:55 PM »
Better way of doing it is to configure two ibays (myweb and myfriendweb) and register two domains myweb.com (or .org, .net etc.) and myfriendweb.com (.net ...). Create both domains on your server and link each domain name to its own ibay.
Next create a user for your friend and alow FTP access to your server.
Search this site for a chroot ftp and using this contrib lock your friend's account to his ibay only.
...

innorevtech

hosting multiple sites with SME?
« Reply #6 on: July 17, 2006, 10:52:26 PM »
when configuring the ibay, does the following field "Public access via web or anonymous ftp" mean that setting it to "entire internet - no password" means you are enabling Anon-FTP?

or does the option in Remote Settings -> FTP Settings -> Allow FTP -> No Access still override this?

I want to make sure i am not opening up some back door; security hole.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: hosting multiple sites with SME?
« Reply #7 on: July 17, 2006, 11:48:46 PM »
Quote from: "innorevtech"

easy one: can the SME host multiple websites?


If the User Guide does not make that clear (which would surprise me a lot), please open a bug against Documentation via the Bug Tracker.

Offline raem

  • *
  • 3,972
  • +4/-0
hosting multiple sites with SME?
« Reply #8 on: July 18, 2006, 03:24:14 AM »
innorevtech

>...or does the option in Remote Settings -> FTP Settings -> Allow FTP -> No Access still override this?

FTP must be enabled in Remote Access for ftp to work at all.
As well as reading the manual (which would answer your question), the answer is also given in the Remote Access panel !


>...how does the SME differentiate between an ibay called "mywebsite"
> and a subfolder in ibays/Primary/html/ called "mywebsite"?

Preference is given to the folder in Primary if you called that up in a URL eg
www.yourdomain/mywebsite

The ibay will be ignored.

Good practice is to only have one occurence of a "name" in the sme system, be it a user account, ibay name, Primary subfolder name etc.
In most cases the system will only let you enter a name once, Primary ibay subfolders are an exception though. It's best not to do things that can cause confusion later when you forget why you named something the way you did.
...