Koozali.org: home of the SME Server
Obsolete Releases => SME 8.x Contribs => Topic started by: LANMonkey on April 26, 2014, 12:55:17 AM
-
I'd like to be able to have a URL go to one iBay and a directory on the URL go to another. For example, www.myurl.com goes to iBay /myiBay1 and www.myurl.com/mystuff goes to /myiBay2.
Is this possible in SME server?
-
I'd like to be able to have a URL go to one iBay and a directory on the URL go to another. For example, www.myurl.com goes to iBay /myiBay1 and www.myurl.com/mystuff goes to /myiBay2.
if www.myurl.com is your principal domain (set in the console) then set it to go to ibay1 (see the domain panel) and then set an ibay called mystuff.
normally www.myurl.com ->ibay1 and www.myurl.com/mystuff ->ibay mystuff
-
Here are some ways I've done this, or looked at doing it:
Option 1: Symlinks
This might work with symlinks:
db accounts myiBay1 FollowSymLinks enabled
cd /home/e-smith/files/ibays/myiBay1/html
ln -s /home/e-smith/files/ibays/myiBay2/html mystuff
signal-event remoteaccess-update
If the content you want from myiBay2 is a webapp like a wordpress or drupal site it may not work with two different URLs (http://www.myurl.com/mystuff AND http://www.myPrimaryDomain.com/myiBay1) -- some web apps allow access via any URL with no problem, some work this way only after jiggering the configuration, and some won't work this way at all (in my experience).
Option 2: Install into .../ibays/myiBay1/html/mystuff
If you *don't* need myiBay2 to work at two URLs (on its own and within myiBay1) you could install the second website into a folder within myiBay1 - and not create a second iBay at all.
Option 3: ProxyPass
If you *do* need myiBay2 to work from both URLs and the symlink method doesn't work, you could proxypass the mystuff folder using the instructions from http://wiki.contribs.org/SME_Server:Documentation:ProxyPass#ProxyPass_a_alias.2Fdirectory.2Flocation:
db accounts set mystuff ProxyPass
db accounts setprop mystuff Target http://localhost/myiBay2
db accounts setprop mystuff Description InternalServer
db accounts setprop mystuff HTTP on
db accounts setprop mystuff HTTPS on
expand-template /etc/httpd/conf/httpd.conf
sv t httpd-e-smith
(note: I think this creates the "/mystuff" url for all domains on the server -- something to be aware of...)
-
Looks good. I'll be back when I try it all out.
Thanks all and if anyone else has anything to add, feel free.