Page 1 of 1

Subdomain guide

Posted: 2011/03/28 17:49:39
by dgcyears
Hey forum, i would like to make a subdomain for my main site for making it a forum but i don't know how can somebody help me plz ? A tutorial would be very nice, ty !

Subdomain guide

Posted: 2011/03/28 21:47:57
by pschaff
Welcome to the CentOS fora. Your question is much too vague for me (and likely others) to have any idea how to answer. It is not clear if you want to set up a publicly accessible IP address, possibly with dynamic DNS; an Apache virtual host; or want a HowTo for creating your own forum; or ...???

Please read the links in my signature and pose your question again.

P.S. Please also note the guidelines notes on use of texting abbreviations (not).

Re: Subdomain guide

Posted: 2011/03/29 10:45:03
by dgcyears
Ok so, i have a domain and i want to make a subdomain for making another site and i don't know how :P

Re: Subdomain guide

Posted: 2011/03/29 13:06:17
by TrevorH
Sorry, I don't find that any clearer. Why don't you try asking the question with an example or two of what you want to do?

Re: Subdomain guide

Posted: 2011/03/29 16:38:14
by dgcyears
Ok so i want to make another site with my domain for an example i have this domain

www.site.ro

I want to make another site like (to have 2 websites)

www.example.site.ro

Re: Subdomain guide

Posted: 2011/03/29 19:34:45
by TrevorH
That's just a matter of registering the new domain in DNS pointing to either the same IP address as the other one or getting a new IP allocated to you. Easier to use the same one but this only works if you do [b]not[/b] want to run SSL web sites on both domains. Then you want to set up apache to use name based virtual hosts something like this (untested!)

[code]
NameVirtualHost www.example.site.ro:80
<VirtualHost www.example.site.ro:80>
ServerName www.example.site.ro
DocumentRoot /var/www/examplesite
...
</VirtualHost>
[/code]

Re: Subdomain guide

Posted: 2011/04/14 19:18:16
by draeath
Note you [b]can[/b] use SSL, but both sites will have to use the same certificate and key, and some old-n-busted browsers may get confused.

The important part of this is that you set all the domains that will be using the cert in your CSR's SubjectAltName. Myself, I use cacert to sign mine, and I generate it for my base domain name, and set a wildcard in the SubjectAltName. This works for me.

Please visit this [url=http://wiki.apache.org/httpd/NameBasedSSLVHostsWithSNI]apache wiki[/url] page for details on the weirdness that can be encountered doing this. The SSL itself is dead simple, so long as you can coax OpenSSL into including the v3 extensions (and SubjectAltName)