Question : When to use IP-based or Name-based virtual servers for Apache

I've been working with Apache on debian linux (lenny) for only a short time and want to host multiple web sites for different customers.  Some web sites will be HTTP only and other will be HTTPS.

What is the rule of thumb when to use IP-based virtual servers, as opposed to name-based?  Does it matter to use name-based (host headers) virtual servers for HTTPS with ssl certificates?

Answer : When to use IP-based or Name-based virtual servers for Apache

If your web server is behind a NAT firewall then you will probably find the IP address easier to use.  Say www.example.com resolves to 98.76.54.32 (public external IP), but the web server has an internal private address 10.98.76.54, you cannot use the name www.example.com for your named host because it will resolve to the wrong IP address.

On the other hand, if you web server has public IP addresses directly bound to it, you can use the name then the virtual host will be bound to the IP address that matches the name and if you move the config to e new web server nothing in the config will change, just make the dns entry change and off you go.

So there is an argument in favour of each method, I guess it depends on your situation and what works for you.

By the way, you cannot use name-based (host headers) virtual servers for HTTPS with ssl certificates on apache, I believe there is a way to do this on IIS with Multiple SAN names on the certificate.


Random Solutions  
 
programming4us programming4us