|
-
May 18th, 2008, 01:27 PM
#1
Thread Starter
Frenzied Member
Creating Subdomains
Not much of a network guy, so scuse my stupidity.
Webserver runs Win2K3 Server, Apache,Php,Mysql (This is live webserver)
I can RDC into server with admin permissions.
Got www folder with current website in subfolders (www/oursite)
created new folder with new site (www/newsite)
Now I want to create a subdomain (http://newsite/oursite.cn).
Tried this and some other similar post, but no luck.
Any advice?
-
May 18th, 2008, 01:41 PM
#2
Re: Creating Subdomains
This is a thread about a sub domain redirect, some info in the thread may be relevant to you http://www.vbforums.com/showthread.php?t=521044
My usual boring signature: Something
-
May 18th, 2008, 01:54 PM
#3
Thread Starter
Frenzied Member
Re: Creating Subdomains
Thanks dc, but maybe I did not make myself clear. (but then..i dont really know how to "say" these things)
For instance, my own website's host allow me to create up to 10 sub domains, but I use their control panel for it. So I have my main site (www.mysite.com) and sub domains I created this way (blog.mysite.com, crm.mysite.com, etc)
It's like completely different websites.
I just assumed that if one are in control of your own webserver (as i am not like i mentioned earlier), one can do that by some edits to the httpconfig without having to register anything.
-
May 18th, 2008, 03:18 PM
#4
Re: Creating Subdomains
So instead of
(http://newsite/oursite.cn).
you meant
(http://newsite.oursite.cn).
Right?
In Apache, you just need to create a new <VirtualHost> . A quick search got me this example
Code:
Listen 80
NameVirtualHost *
<VirtualHost *>
ServerName www.domain.com
DocumentRoot /home/httpd/htdocs/
</VirtualHost>
<VirtualHost *>
ServerName subdomain.domain.com
DocumentRoot /home/httpd/htdocs/subdomain/
</VirtualHost>
Instead of the * though, you probably want to use an IP address.
-
May 18th, 2008, 03:22 PM
#5
Thread Starter
Frenzied Member
Re: Creating Subdomains
thanks again for the reply.
Yes, that is what I meant.
however that is what i did, and it did not work. (i mean like the sample)
maybe i just did sth wrong. will try again after some sleep (it's 4:30 AM on a Sunday Night!)
[EDIT] - Yes I did restart Apache!
-
May 18th, 2008, 03:29 PM
#6
Thread Starter
Frenzied Member
Re: Creating Subdomains
Before I edited the first two was there and worked fine. I added the third & restarted Apache. No Luck
Code:
<VirtualHost xxx.xxx.xxx.xxx:80>
ServerAdmin [email protected]
DocumentRoot "/www/oursite"
ServerName www.oursite.cn
</VirtualHost>
<VirtualHost xxx.xxx.xxx.xxx:80>
ServerAdmin [email protected]
DocumentRoot "/www/oursite_mobi"
ServerName www.oursite.mobi
</VirtualHost>
<VirtualHost xxx.xxx.xxx.xxx:80>
ServerAdmin [email protected]
DocumentRoot "/www/crm"
ServerName crm.oursite.cn
</VirtualHost>
-
May 18th, 2008, 03:31 PM
#7
Re: Creating Subdomains
And you've set up the CNAME as well?
-
May 18th, 2008, 03:32 PM
#8
Thread Starter
Frenzied Member
Re: Creating Subdomains
whats CNAME?
[EDIT] - OIC......(sē-nām) Short for canonical name, also referred to as a CNAME record, a record in a DNS database that indicates the true, or canonical, host name of a computer that its aliases are associated with. A computer hosting a Web site must have an IP address in order to be connected to the World Wide Web. The DNS resolves the computer’s domain name to its IP address, but sometimes more than one domain name resolves to the same IP address, and this is where the CNAME is useful. A machine can have an unlimited number of CNAME aliases, but a separate CNAME record must be in the database for each alias
uuhm....guess web host got to do that?
-
May 18th, 2008, 07:02 PM
#9
Re: Creating Subdomains
You may need a catch all CNAME set up if you want to add arbitrary domains and I suggest that if you want complete control over your domain name records you use a service such as ZoneEdit.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|