A lot websites providing a how-to on virtualmin state that when you are creating a new Virtual Server, there is an option to specify ‘Web server type’ which can be “name based” or “IP based”. I can’t find that option on my installation.
Please see attached screenshot.
is it something that is only available in the PRO version? Or Is it an addon ?
Also in the GPL version you can add IP’s in the Addresses and Networking - Shared IP Addresses
When creating a domain/virtual server, at the bottom - IP address and forwarding - Network interface - you can then choose shared and virtual with IP.
However, it is extremely inefficient to have every website on its own IP. One would do this only if a specific website needs its own certificate, like a ecommerce website.
Also there aren’t enough IP’s to go around with and that is why shared hosting came into play. 100’s even 1000’s of websites can be on a single IP.
I agree with you, that we could have multiple websites on a single IP. I have a specific requirement of using name-based virtualhosting, something like this
<VirtualHost *:80>
when you install the lot the first time, the default location for a website is in /var/www/html
as soon as you create a virtual server, the location will be in /home/*/public_html
and all other servers you create will be under /home. So you need them on 1 IP, unless you have many IP’s available or only want to host as many virtual servers as you have IP’s. That’s up to you.
And yes, you will want to bind Apache and virtual hosts to a specific address, either on 1 IP or on as many IP’s that you have available.
If you don’t, expect issues with resolving domain names to your websites (which you won’t post about as you now know the solution already)…
to conclude:
Logic says: shared hosting equals 1 IP. Secure site (https) is not shared and thus equals a separate dedicated IP