Subdomain guide

If it doesn't fit in another category, ask it here.
Post Reply
dgcyears
Posts: 3
Joined: 2011/03/28 17:46:54

Subdomain guide

Post by dgcyears » 2011/03/28 17:49:39

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 !

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Subdomain guide

Post by pschaff » 2011/03/28 21:47:57

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).

dgcyears
Posts: 3
Joined: 2011/03/28 17:46:54

Re: Subdomain guide

Post by dgcyears » 2011/03/29 10:45:03

Ok so, i have a domain and i want to make a subdomain for making another site and i don't know how :P

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Subdomain guide

Post by TrevorH » 2011/03/29 13:06:17

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?

dgcyears
Posts: 3
Joined: 2011/03/28 17:46:54

Re: Subdomain guide

Post by dgcyears » 2011/03/29 16:38:14

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

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Subdomain guide

Post by TrevorH » 2011/03/29 19:34:45

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]

draeath
Posts: 1
Joined: 2011/04/14 19:13:04
Location: USA
Contact:

Re: Subdomain guide

Post by draeath » 2011/04/14 19:18:16

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)

Post Reply