Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

With IIS it is very easy to setup bindings between a host name and a website.

If I have my DNS setup with the original registrar, all I need to do is update the A records to point to my IIS server and everything just works.

Domain Name -> IP Address -> (using the host header) -> Website

All good.

I have noticed with my Linux hosts that all of them require me to transfer my DNS to their name servers in order to get the 'bindings' to work. From what I can tell there is no way in cPanel to just tell it to associate a host name with a website.

How do I achieve the same things as IIS bindings in Apache/Linux? Is it even possible in cPanel?

share|improve this question
    
This is just the latest in a long list of things I've heard about cPanel that make me never ever want to use it. –  David Z Jul 17 '09 at 17:09

2 Answers 2

This isn't a restriction of Apache at all; it doesn't care where your DNS is hosted. It sounds from Farseeker's answer like it's a restriction of your hosting provider and/or cPanel specifically (I used to use Dreamhost for example, and they didn't care if they held my DNS, but they have their own management interface)

A <VirtualHost> block inside of the apache configuration declares all the directives inside to apply to a virtual host, and the ServerName directive inside of that makes requests bearing that Host header use the block.

Refer to http://httpd.apache.org/docs/2.2/vhosts/name-based.html for details.

share|improve this answer
    
+1 for pointing out that it has nothing to do with Apache itself. –  David Z Jul 17 '09 at 17:08

Yes, I've had this problem with cPanel as well.

What I've done in the past is transfer the DNS to their server so that I can register the name with the host, and then switched it back to my old DNS server afterwards. Of course then it's your own responsibility to ensure that the records are always up to date.

Usually they won't charge you for the DNS hosting, so you're not losing anything, but they may limit the number of domains you can attach.

If you were doing this in apache directly, then you will need to investigate the VirtualHost part of your httpd.conf

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.