Koozali.org: home of the SME Server

Obsolete Releases => SME Server 7.x => Topic started by: MasthaX on September 04, 2007, 05:44:21 PM

Title: Creating subdomains
Post by: MasthaX on September 04, 2007, 05:44:21 PM
Hello i would like to make a subdomain but how will i do this?

i know i can maken records in the DNS by server manager.

Example:

ibay: phpmyadmin
path: /home/e-smith/files/ibays/phpmyadmin

My primary domain is: jurgen-meijer.nl

What i want: http://phpmyadmin.jurgen-meijer.nl

do i have to make a template or what?
Title: Re: Creating subdomains
Post by: pfloor on September 04, 2007, 08:28:43 PM
Hello i would like to make a subdomain but how will i do this?

i know i can maken records in the DNS by server manager.

Example:

ibay: phpmyadmin
path: /home/e-smith/files/ibays/phpmyadmin

My primary domain is: jurgen-meijer.nl

What i want: http://phpmyadmin.jurgen-meijer.nl

do i have to make a template or what?

Create the domain phpmyadmin.jurgen-meijer.nl and point it to your "phpmyadmin" ibay.

Try the Manual, it has LOTS of information in it.  Here is the section pertaining to your situation:

http://wiki.contribs.org/SME_Server:Documentation:Administration_Manual:Chapter13#Domains

Title: Re: Creating subdomains
Post by: cactus on September 05, 2007, 10:11:20 AM
do i have to make a template or what?
If you only want this subdomain (and not www.phpmyadmin.*, mail.phpmyadmin.* etc.), you can do this with templates as well.

Create a directory with the name of the full domain name, in your case: phpmyadmin.jurgen-meijer.nl in the /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/ folder and create template folders for the subdomain there. You will have to know about configuring apache if you would like to do this.

I made it myself a little bit easier by copying in a few sections of the VirtualHosts folder and modifying the necessary sections to my linking. The list for one of my subdomains for instance consists of the following templates:
Code: [Select]
-rw-r--r--  1 root root 322 Sep 18  2003 00Setup
-rw-r--r--  1 root root  30 Mar 14  2006 02ServerName
-rw-r--r--  1 root root 196 Jan 24  2003 25SSLDirectives
-rw-r--r--  1 root root 125 Mar 14  2006 26RewriteTraceAndTrack
-rw-r--r--  1 root root 192 Jan  7  2003 50DirectoryIndex00
-rw-r--r--  1 root root 255 Mar 17  2006 50DirectoryIndex00PHP
-rw-r--r--  1 root root  82 May 13  2003 50DirectoryIndex01
-rw-r--r--  1 root root 215 Jan  7  2003 85DefaultAccess
-rw-r--r--  1 root root  61 Jan 20  2007 99yum.snetram.nl
-rw-r--r--  1 root root  36 Jan  7  2003 template-begin
-rw-r--r--  1 root root  16 Jan  7  2003 template-end
I modified the 02ServerName to only display the subdomain name I specified, so all other configured hostnames are left out. The last fragment 99yum.snetram.nl holds the configuration that exposes my yum directories to the internet.
Title: Re: Creating subdomains
Post by: brentonv on September 18, 2007, 04:19:34 AM
hi cactus. i am interested in this also. could you please explain once more how this is done as i am having problems understanding. i wish sme could just point a subdomain to a seperate ibay rather than create an entirely new virtual domain (www. mail. etc.)

thanks cactus. ps how did you go with http://forums.contribs.org/index.php?topic=37835.0

regards,
brenton
Title: Re: Creating subdomains
Post by: cactus on September 18, 2007, 08:30:58 AM
hi cactus. i am interested in this also. could you please explain once more how this is done as i am having problems understanding. i wish sme could just point a subdomain to a seperate ibay rather than create an entirely new virtual domain (www. mail. etc.)
It is pretty straight forward and I don't think I can tell it much clearer, perhaps you can tell me where you lost track of my story so I can try and explain things a bit more...

thanks cactus. ps how did you go with http://forums.contribs.org/index.php?topic=37835.0
I haven't used that, neither am I willing to as this seems like a security breach to me, but please keep this thread on-topic.