[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 322
  • Last Modified:

Quick subdomain question

I have two really quick and (hopefully) easy questions relating to subdomains in apache2 / ubuntu.

First, can I have two virtualhosts listen on the same port if one is for a subdomain and one is for the main domain?

Second, how do I configure a subdomain in the DNS control panel for godaddy?
I added this record to my CNAME section
*host*          *points to*                      *ttl*
sub	          sub.example.com	              1hr

Open in new window

Is that correct?

Thanks
0
Curtis Long
Asked:
Curtis Long
1 Solution
 
Khandakar Ashfaqur RahmanExpert/ConsultantCommented:
Check the following link:
http://daniel-lange.com/archives/2-Multiple-Apache-VHosts-on-the-same-IP-and-port.html

And for creating a subdomain you need to add A record:
www IN A 123.2.33.45.

Additionally, you can create alias/CNAME but without CNAME it's also ok.
web IN CNAME www.domain.com.
0
 
Curtis LongAuthor Commented:
Thanks! As soon as I created the A record everything started working :)
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now