?
Solved

Subdomain Configuration, Plesk 7, DNS

Posted on 2008-11-04
5
Medium Priority
?
808 Views
Last Modified: 2013-11-11
Hi all,

I'm having issues understanding the setup of a subdomain on my server.  I want to create a subdomain for our forum.  Very simply: forum.mydomain.com...

A) mydomain.com/forum // My forum installation and files are properly working in this directory right now.

B) forum.mydomain.com // I would like for this subdomain to map to A).  Is this possible?

I've created the subdomain through my Control Panel successfully.  Now, on my host management account, I had to add a new DNS record to support my subdomain. CNAME : forum.mydomain.com - all works great till I visit forum.mydomain.com I get a standard plesk holding page.  So I log into the root of the server and I see that there is a folder 'subdomains' and inside of it is the forum directory.

At this point, I really do not want to re-install my forum into this new directory. It was my understanding that the subdomain could be mapped to a folder at the website root.  Is this not accurate?  Any suggestions are greatly appreciated.

Thanks!
0
Comment
Question by:pmagony
  • 3
  • 2
5 Comments
 
LVL 20

Expert Comment

by:edster9999
ID: 22876362
This works.  You shouldn't need to go and change anything in the WHM manager.
From memory I think to get both the forum installed and to get a subdomain you need to do a little cheat.
When you install the forum into domain/forum - it works fine (you have got this far)
If you try to add a subdomain it says 'directory already exists'
Log onto the server.  
Rename the folder to forum2
create the subdomain 'forum' (this adds the dns entries for you)
now Delete forum directory and
Rename forum2 back to forum.

Now your forum words and the subdomin works and points to it.

0
 
LVL 9

Author Comment

by:pmagony
ID: 22876429
In my WHM I *have* to create a DNS entry.  Otherwise it will not work.  The DNS in Plesk does not control the DNS for my website.

When I created the subdomain, it was created here:

mydomain.com/subdomains/forum/httpdocs/ (forum.mydomain.com)

my working forum is here:

mydomain.com/httpdocs/forum/ (www.mydomain.com/forum)

I would like forum.mydomain.com to map to www.mydomain.com/forum.
0
 
LVL 20

Expert Comment

by:edster9999
ID: 22876636
you mention cname.  
Dont use cnames or you will get the wrong content.
give it an 'a' name and point to the servers IP address.
then the apache server is setup to pick up that domain name 'forum.domain.com' and put that into /forum
0
 
LVL 9

Author Comment

by:pmagony
ID: 22877040
I'm sorry, but could you be a little more specific?  "Don't use cnames or you will get wrong content." doesn't sound like expert advice.

Changing, deleting, adding records to DNS can have serious implications.  Please explain why you think I should opt to use an A record over a CNAME record for setting up a subdomain.

Thank you-
0
 
LVL 20

Accepted Solution

by:
edster9999 earned 1500 total points
ID: 22877322
Sorry - not very clearly typed on my side.

cname is an alias to a record with a real IP address (or 'a' record).

If you use a cname the name being typed in is passed to the website and should be the one it uses when apache looks it up.  BUT in some cases the name is the one you are redirecting towards and then you get the wrong content (you would get the content for the main site not the subdomain).
An example of when this can happen is if you loadbalance.
Ok - probably not something you are doing but good advise to start with in my opinion.

Another reason not to use CNames in DNS is it requires twice as many lookups and so delays the requests.  Again small and probably something that doesn't bother you but.... start with a good start.... :)
In your case these two will probably not matter so a Cname will work and will give the right content.

If you have created it in the plesk it will not be using that for the DNS entry but it should put the right settings in the apache config to get it to the right directory when you approach with the sub domain name
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses
Course of the Month16 days, 19 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question