Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
VGSources
Blog

How to Host Multiple Websites With Different IP Addresses on One VPS

Learn how to assign multiple public IPs to one VPS, map domains with DNS, configure Apache or NGINX for IP-based virtual hosting, add HTTPS, isolate sites, and troubleshoot routing and listener failures.
Length10 min Posted Quest giverVGSources Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Yes—you can host multiple websites on one VPS, each on its own public IP address. The setup requires four pieces to agree: your VPS provider must allocate and route the additional addresses, Linux must assign them to the server, DNS must map each hostname to the intended address, and Apache or NGINX must listen on the matching IP-and-port combination.

Apache calls this IP-based virtual hosting: directives are selected according to the IP address and port on which a request arrives. You can also run many sites on one shared address with name-based hosting, but that is a different design. The guide below covers true per-site IPs, HTTP and HTTPS, Apache VirtualHost blocks, NGINX server blocks, isolation, testing, and the failure modes that commonly make one site appear to serve another.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What “different IPs” means in practice

A web request is addressed to an IP address and port before the web server examines the hostname. For true IP-based hosting, every site needs its own unique IP-address/port pair. Two sites can therefore use 203.0.113.10:80 and 203.0.113.11:80; their HTTPS listeners would be 203.0.113.10:443 and 203.0.113.11:443.

One VPS can run a single web-server daemon for all of those listeners. Separate daemons are possible, but they use additional memory and file descriptors and are normally justified only when stronger process-level separation is required.

#1 Best Overall
Sale
GMKtec G3S Mini PC Intel N95 Processor (Up to 3.4GHz) 8GB RAM 256GB M.2 SSD | Mini Desktop Computer with VESA Mount for Office Home Business HTPC Proxmox, Dual 4K Display, WiFi 5, Gigabit Ethernet
  • 12th Intel Alder Lake N95 Processor – The GMKtec G3 S Mini PC is powered by the 12th Gen Intel N95 processor with 4 cores, 4 threads, 6MB cache and a burst frequency up to 3.4GHz. Compared with N100/N5105/N5100/N5095, the N95 delivers up to 36% overall performance improvement. Perfect for routine tasks, office work, and home entertainment, this compact mini desktop is more convenient than traditional bulky PCs.
  • 8GB RAM & 256GB SSD Storage – Pre-installed with 8GB DDR4 memory and a fast 256GB M.2 2242 SSD, the G3 S mini desktop offers quicker startup, smoother multitasking, and faster file transfers. Enjoy seamless performance whether you’re working on multiple applications, browsing, or streaming content.
  • Rich Interfaces & Connectivity – The G3 S mini computer comes equipped with USB 3.2 (up to 10Gbps), dual HDMI 2.0 (4K@60Hz), and a 3.5mm audio jack. With support for WiFi 5, Bluetooth 5.0, and Gigabit Ethernet (RJ45 1000MbE), it connects easily with monitors, projectors, printers, office equipment, and other peripherals, making it versatile for both home and business use.
  • Dual 4K Display Support – Featuring upgraded Intel UHD Graphics (up to 1000MHz), the G3 S supports 4K video playback and AV1 decoding for a smooth viewing experience. With dual HDMI outputs, you can connect two 4K@60Hz displays simultaneously, enabling efficient multitasking for work and entertainment.
  • GMKTEC WARRANTY - GMKtec offers a 3-year limited warranty (1 year replacement + 2 years parts replacement) for each mini PC, starting from the date of the purchase effective on all sales starting Oct. 2026. All defects due to design and workmanship are covered. With a professional after sales team always ready to attend to your needs, you can simply relax and enjoy your mini PC
Hosting model What distinguishes a site When to choose it
IP-based virtual hosting Distinct IP-and-port combination Each site must have its own public address, policy, reverse-DNS identity, or network treatment.
Name-based virtual hosting Hostname in the HTTP Host header Several sites can share one public IP when separate addresses are unnecessary.
Separate daemons Independent processes as well as addresses Sites need process-level boundaries and the VPS has enough memory and file descriptors.

Different addresses do not automatically isolate files, users, databases, or processes. Those controls must be designed separately.

Prerequisites to verify before configuring the web server

Additional public addresses

Ask the VPS provider whether you can attach the required IPv4 and/or IPv6 addresses, whether they are routed to the instance, and whether there are allocation limits or extra charges. Confirm that reverse DNS is available if a site’s mail or compliance requirements depend on it. An address shown in a provider panel but not routed to the VPS will not work, regardless of the Apache or NGINX configuration.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Operating-system networking

Linux must have every public address assigned to the host interface or to a supported interface alias. Make the assignment persistent using the networking method supplied by your distribution; a temporary alias can disappear after a reboot. Verify the address and route from the VPS before changing the web server.

Firewall and ports

Allow TCP port 80 for HTTP and TCP port 443 for HTTPS on the provider firewall and the VPS firewall. Rules must cover each assigned address where your firewall supports address-specific policies. Keep administration ports restricted to trusted sources rather than opening them globally.

Domains and content

Have the document roots, ownership, permissions, and deployment method ready for each site. Decide whether each site is static content, an application proxied to another local port, or a mixture. The examples below use separate directories such as /var/www/site-a and /var/www/site-b.

Certificates

Every HTTPS hostname needs a certificate whose names match that hostname and a renewal process. Certificates are associated with hostnames, not merely with the VPS, so plan issuance and renewal for each site.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
GEEKOM A5 2027 Edition Mini PC, Ryzen 7 7730U, 16GB RAM, 256GB NVMe SSD
  • [15W Ryzen 7 Agentic PC for Everyday Workflows] Powered by the AMD Ryzen 7 7730U processor (8 Cores, 16 Threads), the GEEKOM A5 is built for sustained productivity. It doubles as your cloud-native Agentic AI assistant, seamlessly hosting cloud AI tasks, automating office workflows, and handling intelligent document summarization without complex local deployment. Smoothly manage Microsoft Office, dozens of browser tabs, heavy Excel spreadsheets, and remote learning throughout your workday.
  • [Smart Value Now, Expandable for Tomorrow] Equipped with 16GB RAM and a fast 256GB PCIe NVMe SSD for snappy daily performance, the A5 offers incredible value. Need more space later? It features dual-slot DDR4 RAM (upgradable to 64GB) and supports an M.2 SSD up to 4TB. With an extra M.2 2242 slot and 2.5" HDD bay for up to 10TB total storage, you get the flexibility to scale your storage seamlessly as your needs grow, beating soldered LPDDR solutions.
  • [Multi-Display Connectivity for Maximum Productivity] Create a complete workstation with support for up to four displays through Dual HDMI and Dual USB-C ports, including up to 8K output via USB-C. Stay connected with Wi-Fi 6, Bluetooth 5.4, a 2.5GbE LAN port, SD card reader, and multiple USB ports for fast networking, efficient multitasking, and seamless connectivity across all your devices.
  • [Built to Stay Cool, Quiet & Reliable] More than fast, the GEEKOM A5 is built to last. A reinforced one-piece all-metal internal frame enhances structural strength, while the upgraded IceBlast 3.0 cooling system improves cooling efficiency by up to 42% with up to 35% greater airflow for quieter operation. Backed by 339 reliability tests and a 72-hour full-load aging test, it's engineered for dependable long-term performance.
  • 🏢[Business-Ready, Compact & Efficient] Pre-installed OS, the GEEKOM A5 supports Wake-on-LAN, Scheduled Power On, and Group Policy, making deployment and remote management simple for businesses. Its ultra-compact 0.6L design fits neatly behind monitors or into space-limited workstations while delivering excellent power efficiency for home offices, front desks, and commercial environments.

Create an address and DNS map

Write down the intended mapping before editing configuration. Documentation-only addresses are used in this example; replace them with the addresses your provider actually assigned.

Site Public IPv4 HTTP listener HTTPS listener DNS records Document root
site-a.example 203.0.113.10 203.0.113.10:80 203.0.113.10:443 A to 203.0.113.10; AAAA if IPv6 is enabled /var/www/site-a
site-b.example 203.0.113.11 203.0.113.11:80 203.0.113.11:443 A to 203.0.113.11; AAAA if IPv6 is enabled /var/www/site-b

Create an A record for each IPv4 hostname and an AAAA record when the site should be reachable over IPv6. Include the same mapping for required subdomains such as www. DNS configuration is separate from web-server configuration: defining a virtual host does not create DNS records. The hostname must resolve to the intended address before visitors can reach that site.

Assign and verify the addresses on the VPS

  1. Allocate the additional public addresses in the provider control panel or API and attach them to the VPS.
  2. Configure the operating system so each address is present on the active interface or a supported alias, using the persistent network configuration for that distribution.
  3. Confirm that the provider route, local address, and firewall policy all agree. An address assigned to the wrong instance or region will fail even if local configuration looks correct.
  4. Check reachability from an external network after DNS is published. Test both IPv4 and IPv6 separately when both records exist; an incorrect AAAA record can make IPv6 users fail while IPv4 users succeed.

Do not bind the web server to an address that is not present locally. The service may fail to start, or the listener may not accept traffic after a reboot when a temporary alias disappears.

Apache configuration for separate IPs

Apache uses a <VirtualHost address:port> block for each IP-based site. Set a distinct ServerName, document root, and log files so requests and errors remain attributable to the right site.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

HTTP listeners and VirtualHost blocks

Listen 203.0.113.10:80
Listen 203.0.113.11:80

<VirtualHost 203.0.113.10:80>
    ServerName site-a.example
    DocumentRoot /var/www/site-a
    ErrorLog ${APACHE_LOG_DIR}/site-a-error.log
    CustomLog ${APACHE_LOG_DIR}/site-a-access.log combined
</VirtualHost>

<VirtualHost 203.0.113.11:80>
    ServerName site-b.example
    DocumentRoot /var/www/site-b
    ErrorLog ${APACHE_LOG_DIR}/site-b-error.log
    CustomLog ${APACHE_LOG_DIR}/site-b-access.log combined
</VirtualHost>

The addresses in Listen and VirtualHost must match the addresses assigned to the VPS. If you use a distribution that separates enabled and available site files, place each site in the appropriate location and enable it using that distribution’s tooling. Keep application-specific directives inside the site that needs them rather than placing them in a global block.

HTTPS listeners

Create corresponding listeners and virtual hosts on port 443. Each block must reference the certificate and private key for its hostname, or a certificate that legitimately covers all names in that block. Keep the site-specific access and error logs so certificate, redirect, and application failures can be diagnosed per address.

Rank #3
BOSGAME E5 11 Pro Mini PC, AMD Ryzen 5300U 4C/ 8T, Business Home Office PC | 8GB DDR4 256GB M.2 2280 SSD, 2.5 GbE Dual Lan Desktop Computers, Triple Displays 4K 60Hz, Wi-Fi 5, BT 5.0, Support Linux SSH
  • 【AMD Ryzen 3 5300U CPU: Outperforms N150 & 3500U】 BOSGAME E5 mini PC is powered by the TSMC 7nm FinFET architecture AMD Ryzen 3 5300U processor (4 Cores, 8 Threads, up to 3.8GHz boost, 6MB total cache). Compared to low-end Intel N150 or 3500U chips which only have 4 single threads and throttle under load, the 5300U delivers over 30% faster multi-core speed. Run 30+ browser tabs, large Excel sheets, and Zoom meetings simultaneously without system lag.
  • 【8GB DDR4 RAM & 256GB NVMe SSD Storage】 Installed with high-speed 8GB DDR4 dual-channel memory and a fast 256GB M.2 2280 SSD, eliminating slow boot times and application loading delays. To accommodate growing data requirements, the upgradeable hardware design features dual SODIMM slots that allow you to expand memory up to 64GB RAM, ensuring smooth operation during heavy multitasking.
  • 【High-Capacity Dual M.2 SSD Storage Expansion】 Never worry about running out of space for your business files. In addition to the pre-installed 256GB system drive, the motherboard houses an extra empty internal M.2 2280 NVMe PCIe 3.0 slot. This allows you to easily add a second solid-state drive for up to an additional 2TB of storage capacity (upgrades not included) without needing to remove or reinstall the original operating system.
  • 【Radeon 6-Core Graphics & Triple 4K Displays】 Integrated with official AMD Radeon Graphics (6 Graphics Cores, 1500 MHz frequency) for casual gaming, photo editing, and crisp 4K media decoding. Featuring 1x HDMI 2.0 port, 1x DisplayPort, and 1x Full-Function Type-C port, the E5 outputs true 4K@60Hz resolution to three monitors at once. This multi-screen setup eliminates constant window-switching for traders, programmers, and office workers.
  • 【Dual 2.5GbE LAN Ports for Advanced Networking】 Experience fast wired network transmission speeds up to 2500Mbps without lagging or buffering. The integration of dual 2.5 Gigabit Ethernet ports (powered by Realtek RTL8125 controller) makes this compact computer an exceptional hardware choice for tech enthusiasts. Easily configure it into software routers, hardware firewalls (pfSense, OpnSense), home NAS servers, or local homelabs.

After editing, run the configuration validator supplied by your operating system (commonly apachectl configtest or an equivalent), correct every syntax error, and reload Apache rather than stopping it. A reload preserves existing connections while applying valid configuration; the exact service name differs between distributions.

One daemon or several?

A single Apache daemon can serve all the virtual hosts when shared process settings are acceptable. Apache documentation notes that separate daemons can provide stronger process-level partitioning, but each additional daemon consumes memory and file descriptors. Separate daemons also multiply upgrade, logging, monitoring, and certificate-renewal work, so use them only for a defined isolation requirement.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

NGINX configuration for separate IPs

NGINX permits multiple server directives inside the http context. It first selects servers matching the listening address and port, then compares the request’s Host header with server_name. With one site per address, the address match provides the primary separation and the hostname confirms the intended site.

HTTP server blocks

server {
    listen 203.0.113.10:80;
    server_name site-a.example;
    root /var/www/site-a;
}

server {
    listen 203.0.113.11:80;
    server_name site-b.example;
    root /var/www/site-b;
}

Use a separate block for every address-and-port combination. If a site is an application, replace or supplement root with the appropriate local proxy target and keep that target unique to the site. Add equivalent 443 blocks with the certificate directives required by your chosen TLS setup.

Validate and reload

Run the NGINX configuration test (commonly nginx -t) before reloading. Do not reload a configuration that reports an error. Confirm that the service is listening on every intended address and port after the reload; a block that parses correctly can still be unreachable if the address is not routed or the firewall is closed.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

DNS, redirects, and TLS operations

DNS must match the listener

For site-a.example, the A record must return 203.0.113.10; for site-b.example, it must return 203.0.113.11. If you publish AAAA records, those IPv6 addresses must be assigned, routed, and served by the corresponding 80 and 443 listeners. A stale record, an accidental shared address, or an incorrect IPv6 entry can send users to the wrong site even when the web-server files are perfect.

Rank #4
Dell OptiPlex 7050 Micro Computer, Intel Quad Core i5-6500T up to 3.1GHz, 16G DDR4, 256G SSD, Windows 11 Pro 64 Bit (Renewed)
  • This Certified Refurbished product is tested and certified to look and work like new. The refurbishing process includes functionality testing, basic cleaning, inspection, and repackaging. The product ships with all relevant accessories, a minimum 90-day warranty, and may arrive in a generic box. Only select sellers who maintain a high-performance bar may offer Certified Refurbished products on Amazon.com.
  • Dell OptiPlex 7050 Micro Computer, Intel Quad Core i5-6500T up to 3.1GHz, 16G DDR4, 256G SSD.
  • Includes: USB Keyboard & Mouse, Microsoft office 30 days free trail.
  • Ports: 1 x RJ-45, 1 x HDMI, 1 x DP, 6 x USB 3.0.
  • 4K Support: Support 4K (3840x2160) Dual display, makes it easy to connect two monitors at the same time, and you can expand working Windows, mirror content, or expand a single window across multiple monitors.

HTTP to HTTPS redirects

Implement redirects separately for each hostname so a request arriving on one address is redirected to that same hostname. Test the final URL, certificate name, and content independently for every site. Avoid a global redirect that sends all addresses to one canonical domain unless that is intentional.

Certificate renewal

Track certificate expiry and renewal for every hostname. Renewal jobs must be able to reach the correct site or use a supported challenge method, and a renewed certificate must be installed in the matching 443 block. After renewal, reload the web server and verify the certificate presented on each address.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Isolation beyond IP addresses

Different IPs do not prevent one site’s code from reading another site’s files. Use separate Unix users or groups, restrictive directory permissions, and deployment paths for each site. Keep writable upload directories isolated from executable code where your application design permits it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For stronger boundaries, consider containers or separate daemons, balancing that benefit against memory, file-descriptor, patching, and monitoring overhead. Run databases and background workers with credentials scoped to one site. Give each site separate logs, backups, environment files, and secrets; never assume an IP distinction is a security boundary by itself.

Validate each site before announcing it

  1. Confirm the address is present on the VPS and remains present after a reboot or network restart.
  2. Check that DNS A and AAAA records return only the intended addresses for each hostname.
  3. Verify that the provider and host firewalls allow ports 80 and 443 on those addresses.
  4. Validate Apache or NGINX syntax, reload the service, and confirm listeners for every address-and-port pair.
  5. Request each hostname over HTTP and HTTPS from an external network. Check the status code, Host-based routing, document root, redirect target, and certificate name.
  6. Inspect the site-specific access and error logs while making a request. The request should appear in the log belonging to the address and hostname you tested.
  7. Test failure recovery: reboot the VPS, renew or replace a certificate in a staging procedure, and temporarily remove one address to ensure monitoring detects the outage.

Troubleshooting common failures

Symptom Likely cause Fix
Connection refused on one address The service is not listening on that address, or the host firewall blocks the port. Check the listener definitions, local address assignment, and both firewall layers; then reload after correcting configuration.
Timeout from the internet The provider has not routed the address, or an upstream firewall/security rule drops traffic. Ask the provider to verify routing and allocation, then compare provider and VPS firewall rules.
Both domains show the same site DNS points both names to one address, or the server has only one matching virtual host. Correct the A/AAAA records and add a distinct Apache VirtualHost or NGINX server block for the second address.
HTTP works but HTTPS fails No 443 listener, blocked port 443, or missing/incorrect certificate configuration. Add the matching 443 block, open the port, install a certificate for the hostname, and reload.
Only IPv6 users fail An AAAA record exists but the IPv6 address is not assigned, routed, firewalled, or listened on. Either complete IPv6 networking and listeners or remove the AAAA record until the site is ready.
Configuration works until reboot The extra address was added temporarily rather than through persistent network configuration. Save the address in the distribution’s persistent networking system and retest after reboot.
One site’s files are exposed to another Shared ownership or permissive directory permissions. Use separate Unix identities, least-privilege permissions, isolated secrets, and application-specific service users.
Reload fails after an edit Syntax error, duplicate listener, or an address not available locally. Run the server’s configuration test, read the reported file and line, correct it, and verify the address before retrying.

Apache or NGINX: which fits this design?

Consideration Apache NGINX
Configuration object VirtualHost blocks with ServerName, DocumentRoot, and log directives. server blocks with listen, server_name, and root or proxy settings.
Address matching Each IP-based host uses a distinct IP-and-port combination. NGINX selects address and port first, then evaluates the Host header against server_name.
Process model One daemon can serve all sites; separate daemons increase isolation and resource use. Typically one master process manages workers and all configured sites; stronger isolation requires an additional design such as separate instances or containers.
Per-site logging Explicit ErrorLog and CustomLog directives are available in each host. Configure access and error logs per server block when separate records are required.
Best deciding factor Existing Apache expertise, modules, and application compatibility. Existing NGINX expertise, reverse-proxy requirements, and its server-block tooling.

Both models support multiple websites on one machine. Choose the server that matches your applications and operational skills; changing software does not remove the provider, DNS, firewall, TLS, or isolation work.

Plan provider operations as the site count grows

Before adding more sites, confirm the provider’s limits for extra IPv4 addresses, IPv6 allocation, bandwidth, backups, and support. Document which address belongs to which hostname, where reverse DNS is configured, and who can change DNS. Keep a tested backup of web-server configuration, certificates, keys, and site data.

Monitor each address independently. A single VPS outage affects every site, so separate IPs are useful for routing and identity but are not high availability. If one site has unusual traffic or resource demands, measure CPU, memory, disk, file descriptors, and bandwidth before adding more tenants. Move that site to another instance when the shared machine becomes a capacity or risk constraint.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Practical completion checklist

  • Provider has allocated and routed every required public IPv4/IPv6 address.
  • Linux assigns those addresses persistently after reboot.
  • DNS A and AAAA records map each hostname to the intended address.
  • Ports 80 and 443 are allowed by provider and host firewalls.
  • Apache listeners and VirtualHost blocks, or NGINX listen directives and server blocks, match the assigned addresses.
  • Each site has its own root or proxy target, logs, permissions, and secrets.
  • Each HTTPS hostname has a valid certificate and renewal path.
  • External tests confirm correct content, redirects, certificates, and logs for every address.
  • Backups, monitoring, and recovery procedures cover the VPS and each hosted site.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.