There are only several situations where you would need to assign and dedicate an IP address to a website on the web-server’s end.
Under normal circumstances, you can host 100s of websites, each using its own separate domain name and aliases, on the same exact single IP address – without having to assign or use any specific IP address (that is, on the web-server’s end).
Once you assign a dedicated IP address to a website, any requests that come in on that IP address, will return only that specific website, regardless of the domain name used, and you will not be able to host other websites without an additional IP address.
Domain Based Hosting Vs IP Based Hosting
Any URL request made by Browser (i.e., an HTTP/1.1 request) has a “Host” Header in it, that the web-server can read. This “Host” Header specifies the requested domain name.
With the current WampDeveloper Pro configuration, the way it works is that Apache reads that “Host” Header (from the incoming request) to get the domain name, and returns the proper website by matching that domain name to one of the websites’ Primary Domain Name or Domain Aliases. Once the request reaches Apache, no IP addresses are used to select a website.
Using Domain Based Hosting, after you set up DNS for your domain names, everything else is taken care of automatically…
When a request from a Browser is made, the DNS system will resolve the domain name to an IP address, and the request will travel and route though the internet using that IP address, but when it reaches WampDeveloper Pro, Apache will simply read the “Host” Header (that is part of that incoming request) to get the domain name, and will then return the proper website (by matching that domain name with one of the websites).
To set up DNS, using the DNS control panel of your Registrar or DNS provider, assign each domain-name (including the “www” part, the base domain part, and any aliases) an IP address via an “A” record. Then wait an hour for the global DNS system to update.
IP Based Hosting
There are several edge-cases and situations where Domain Based Hosting does not work 100% for everyone:
1. HTTP/1.0 requests do not contain the “Host” Header, which was introduced in HTTP/1.1. Some older or very simple programs, scripts, and bots, that visit or send requests to your website might still use HTTP/1.0 (or they just might make a direct connection without using DNS). In which case Apache will return the default (first loaded) website instead of the correct website.
2. Very old versions of Browsers (e.g., IE6) do not support SNI (Server Name Indication). And when those Browsers make an HTTPS request, since the “Host” Header is only decrypted and read after the SSL connection is established, Apache has no choice but to return the default (first loaded) website’s SSL certificate instead of the proper website’s SSL certificate. And the user is presented with a certificate mismatch warning and/or is prevented (for security reasons) from loading the website by the Browser.
3. Related to #2, aside from IE6, all versions of IE on Windows XP and Server 2003, Safari on XP, and some other earlier versions of other Browsers do not have native support for SNI, relying on the OS’s implementation of it. And Windows XP and Server 2003 did not provide an implementation of the needed system component for SNI.
4. Users, configuration policies, and some installed programs (such as McAfee) are able to disable some SSL and TLS protocol versions (on Windows), or their SNI extension, and occasionally do so for unknown reasons. Any Browser that does not use its own integrated implementation of the needed components will not be able to make an SNI enabled request in this situation.
Assigning a Dedicated IP Address to a Website
Edit the website’s HTTP and HTTPS VirtualHost files.
* Select your website in WampDeveloper’s Websites Tab, click the HTTP and HTTPS VirtualHost button.
Update this:
<VirtualHost *:80>
With this:
<VirtualHost specific.ip.address.here:80>
Save files. Restart Apache.