For name-based sites in web hosting environments, websites can be configured either as name-based sites (multiple domains sharing a single IP) or IP-based sites (each site having its own unique IP address).
You might need to convert a name-based site to an IP-based one when setting up SSL certificates or when you require a dedicated IP address.
This guide will show you how to convert a name-based site into an IP-based site using the “EditVirtDomain” command.
Steps to follow to convert a site:
1. Access the Server as Root
You will need root user privileges to run the required command. Log in via SSH:
- “ssh root@your-server-ip”
2. Run the EditVirtDomain Command
Use the following syntax to convert a domain from name-based to IP-based:
- “EditVirtDomain -c ipinfo, namebased=0, ipaddrs=[IP_Address] domain_name”
3. Replace Values with Your Own
- IP_Address >> The dedicated IP address you want to assign.
- domain_name >> The domain you want to convert.
Example:
EditVirtDomain -c ipinfo, namebased=0, ipaddrs=[207.44.169.18] centralrock.es
In this example:
- “207.44.169.18” is the IP address assigned to the domain.
- “centralrock.es” is the domain being converted.
4. Verify the Change
Once the command runs successfully:
- Restart Apache or Ensim services if needed.
- Check the domain’s configuration file to confirm it’s now IP-based.
Why Convert to an IP-Based Site?
-
SSL Certificates >> Some older environments require dedicated IPs for SSL installation.
-
Dedicated Resources >> Ensures one domain doesn’t share an IP with others.
-
Custom DNS >> Easier to configure reverse DNS for mail servers.