Gandi Groups


Gandi Simple Hosting: Bare domain Server-Alias to www

You should be logged in to post new messages. Create an account.

Hi,

How do I add a domain alias to existing Simple Hosting?
Not a new vhost with separate content, not a web forwarding. 

I want my bare domain and "www" subdomain both point to the same folder in
Simple Hosting. So that is a user comes by a http://domain.com/ he would
experience the site like that,
but if she comes to www.domain.com - all further pages would use that
sub-domain.


Kind regards,
Sergei.
I'm no DNS expert, but I believe you should be able to put a CNAME in for
your www entry to point to your bare domain to achieve the same effect.
My last remark was wrong - the inbound HTTP request will still bare the
hostname, so you will see different content.  duh.

Anyway, I found a great little utility - php file manager - and using that,
you can create symlinks in your simple hosting box.

http://phpfm.sourceforge.net/

1. create a simple space to put this (say fileman.blah.com)
2. although you can set a password in the tool, i'd recommend setting your
.htaccess also
(http://wiki.gandi.net/en/hosting/using-lin...)
3. create your vhosts
4. under the vhost you want to link to another, delete the created 'htdocs'
folder (...www.foo.com/htdocs)
5. using php file manager, you can 'execute command' to create a link. 
Something like 'ln -s /svr/data/web/vhosts/foo.com/htdocs
/svc/data/web/vhosts/www.foo.com/htdocs' (a relative web path will work
better for your sftp client)

www.foo.com is it's own vhost, linked to the same content for foo.com

hope that helps.
troy.
Troy Parsons avait énoncé :
My last remark was wrong - the inbound HTTP request will still bare the
hostname, so you will see different content.  duh.

Anyway, I found a great little utility - php file manager - and using
that,
you can create symlinks in your simple hosting box.

http://phpfm.sourceforge.net/

1. create a simple space to put this (say fileman.blah.com)
2. although you can set a password in the tool, i'd recommend setting your
.htaccess also
(http://wiki.gandi.net/en/hosting/using-lin...)
3. create your vhosts
4. under the vhost you want to link to another, delete the created
'htdocs'
folder (...www.foo.com/htdocs)
5. using php file manager, you can 'execute command' to create a link. 
Something like 'ln -s /svr/data/web/vhosts/foo.com/htdocs
/svc/data/web/vhosts/www.foo.com/htdocs' (a relative web path will work
better for your sftp client)

www.foo.com is it's own vhost, linked to the same content for foo.com

hope that helps.
troy.
t's a bad idea to have a single site hosted on 2 different URL. Making 
a redirection (permanent) from the alais to the main address is a 
better solution