Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversHalloween 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 Now×
Skip to content
World desk10 min

How to Host Multiple Websites With Different IPs on One VPS

A single VPS can serve multiple websites on separate public IP addresses when the provider routes the addresses to the instance. This guide covers networking, DNS, Apache, NGINX, TLS, isolation and troubleshooting.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Yes. One VPS can host many websites on different public IP addresses. The provider must first assign and route an additional IPv4 or IPv6 address to the VPS. You then bind each address to the server’s network interface, point each domain’s DNS records at the intended address, and configure Apache virtual hosts or NGINX server blocks to listen on the matching address and port. HTTPS certificates, firewall rules, permissions and monitoring must be configured for every site as well.

What “different IPs” means in a VPS setup

A VPS normally has one primary public address, but a hosting provider can attach more addresses to the same virtual machine. The operating system sees those addresses on one network interface (or on virtual aliases), while the web server uses the destination address and port to choose how to handle a request.

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.

Apache describes IP-based virtual hosting as applying different directives according to “the IP address and port a request is received on.” In practical terms, 203.0.113.10:80 and 203.0.113.11:80 are separate listening endpoints even though they belong to the same VPS. A single web-server process can serve both sites. You do not need one VPS or one daemon per website unless you have a specific isolation requirement.

IP-based hosting is different from name-based hosting. With name-based hosting, several domains share one address and the server distinguishes them mainly by the HTTP Host header. With IP-based hosting, each site has its own address/port combination first; the hostname still matters for selecting the correct site configuration and certificate.

#1 Best Overall
Sale
TOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones | IPX5 Waterproof,2 Mics for AI Calls,Immersive Premium Sound Bass Headset with Charging Case,32 EQ via App Black
  • [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
  • [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
  • [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
  • [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
  • [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.

Prerequisites to verify before configuring the web server

Additional addresses and routing

Ask the VPS provider whether your plan and region support extra public IPv4 addresses, additional IPv6 addresses or prefixes, and the routing method required for them. An address shown in a control panel is not sufficient if traffic is not routed to the instance. Confirm any allocation limits, recurring address charges, reverse-DNS controls, bandwidth policy, firewall behavior and backup coverage before committing to the design.

Record the exact address, prefix length or netmask, gateway requirements and whether the provider expects the address to be configured directly on the primary interface or through an alias. IPv4 and IPv6 may use different gateway and firewall rules. Do not assume that an IPv6 address automatically provides equivalent reachability to IPv4.

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

Operating-system networking

The VPS must have every public address assigned to its network interface (or an equivalent virtual interface). Check the result with your distribution’s networking tools, such as ip addr and ip route. If an address is missing from the interface, the web server cannot bind to it, regardless of how correct the site configuration looks.

Make the assignment persistent using the network configuration system supplied by your Linux distribution or image. A temporary assignment made with a command-line tool can disappear after a reboot or network restart. Test a reboot or reload during a maintenance window before declaring the setup complete.

Web-server and filesystem prerequisites

  • Install either Apache HTTP Server or NGINX and confirm which process owns ports 80 and 443.
  • Create a separate document root (or proxy target) for each website.
  • Give the web-server user read and execute access to the required directories without making the entire filesystem writable.
  • Plan separate access and error logs so a fault on one site can be diagnosed without filtering a single mixed log.
  • Open only the required ports in the VPS provider firewall and the operating-system firewall.

Design the address, DNS and site map

Write down the intended mapping before editing configuration. A simple map prevents a common error in which DNS points to one address while the virtual-host block listens on another.

Rank #2
Sale
Smart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)
  • 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
  • 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
  • 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
  • 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
  • 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.
Site Public address HTTP endpoint Document root or upstream DNS records
site-a.example 203.0.113.10 203.0.113.10:80 /var/www/site-a A → 203.0.113.10; AAAA if IPv6 is used
site-b.example 203.0.113.11 203.0.113.11:80 /var/www/site-b A → 203.0.113.11; AAAA if IPv6 is used

The addresses in this table are documentation examples only. Replace them with the addresses actually routed to your VPS.

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

Create DNS records for every hostname

Create an A record for each hostname that should resolve over IPv4 and an AAAA record when the site is reachable over IPv6. Include the bare domain and any required subdomains, such as www, explicitly. DNS configuration is separate from web-server configuration: creating an Apache or NGINX site does not create DNS records.

Check the public result with DNS lookup tools from more than one network. During propagation, different resolvers can return old and new answers according to the record’s TTL. Do not issue a certificate or troubleshoot an application until the hostname resolves to the intended address from the public Internet.

Apache: configure one IP-based virtual host per site

Apache uses <VirtualHost address:port> blocks. For genuine IP-based separation, each block must use a distinct IP-address/port combination. A single Apache daemon can serve all blocks when they can share the same process-level security boundary.

1. Make Apache listen on each address

Declare the addresses and ports explicitly. The following is an illustrative HTTP configuration; substitute your assigned addresses and distribution-specific file paths.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
New Bee Guitar Cable 10ft Electric Instrument Bass AMP Cord
  • [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
  • [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
  • [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
  • [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
  • [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by
Listen 203.0.113.10:80
Listen 203.0.113.11:80

If Apache is already configured with a wildcard Listen 80, keep the configuration internally consistent. Duplicate or conflicting listen directives can prevent Apache from starting, so validate the complete configuration before reloading.

2. Create separate virtual-host blocks

<VirtualHost 203.0.113.10:80>
    ServerName site-a.example
    ServerAlias www.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
    ServerAlias www.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>

Use a unique DocumentRoot, log file and primary ServerName for each site. Add aliases only when those hostnames should serve the same content. Ensure the directories exist and contain a small test page before deploying an application.

3. Validate, enable and reload

  1. Check that every address is present on the host interface and that ports 80 and 443 are allowed through both firewalls.
  2. Run Apache’s configuration test (commonly exposed as apachectl configtest or httpd -t, depending on the distribution).
  3. Enable the site files using the mechanism provided by your distribution, if it separates available and enabled configurations.
  4. Reload Apache only after the configuration test reports success. A reload applies changes without unnecessarily terminating existing connections.
  5. Request each hostname and inspect the response headers and the per-site access log to confirm that the request reached the intended block.

4. Add HTTPS listeners and certificates

For HTTPS, create corresponding 443 listeners and virtual-host blocks for every address that will accept TLS traffic. Each hostname needs a certificate whose names match the hostname, a private key readable by Apache, and a renewal process. Apply the same site-specific logging and document-root rules to the TLS blocks. Confirm that the certificate authority can reach the hostname over the public address and that the provider firewall allows the validation method you select.

When separate Apache daemons make sense

Running separate daemons can provide stronger process-level partitioning when sites have incompatible modules, distinct service users or unusually strict isolation requirements. Apache’s documentation also notes the cost: additional daemons consume more memory and file descriptors. Separate daemons are therefore an isolation decision, not a requirement for assigning different IP addresses.

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

NGINX: use address-specific server blocks

NGINX permits multiple server directives inside the http context. It first finds servers matching the local address and port, then compares the request’s Host header with server_name. Binding each block to a distinct address makes the IP mapping explicit.

Rank #4
BSIMB 15.6" Digital Family Calendar & Chore Chart, No Subscription Fees
  • Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
  • Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
  • All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
  • Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
  • Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.

1. Define one block per address

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

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

For dynamic applications, replace root with the appropriate proxy or FastCGI configuration and keep the upstream definition associated with the correct site. Do not copy a block and forget to change its address, hostname, root or log paths.

2. Test and reload safely

  1. Confirm that the addresses are assigned to the operating system and that NGINX can bind the requested ports.
  2. Run nginx -t and correct every syntax or file-permission error it reports.
  3. Enable the configuration using your distribution’s convention, then reload NGINX after a successful test.
  4. Request each hostname and verify the returned content, status code and access log.

3. Configure TLS blocks

Add an address-specific listen 203.0.113.10:443 ssl; (and the equivalent for each address), then set the certificate and key for the hostnames served by that block. Repeat for every HTTPS hostname and automate renewal. A certificate for one domain does not automatically cover a different domain unless its names explicitly include it.

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

Apache or NGINX: which approach fits?

Decision area Apache NGINX
Site container <VirtualHost address:port> block server {} block in the http context
IP binding Declare matching Listen directives and address/port pairs Use address-specific listen directives
Static files DocumentRoot root
Logs Typically ErrorLog and CustomLog per host Configure per-site access and error logs as needed
Isolation option One daemon for efficiency, or separate daemons for stronger process separation Usually one master process with worker processes; use filesystem, user and service boundaries for site separation
Failure check Use the distribution’s Apache configuration test before reload Use nginx -t before reload

Choose the server your team already operates reliably. Different IP addresses do not by themselves make Apache more isolated than NGINX, nor do they require a particular web server. Permissions, service users, application containers and deployment practices determine most of the practical separation.

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

Security and isolation for unrelated websites

Separate users and writable paths

Give each site its own Unix user where practical, keep application uploads in that site’s directory, and avoid making document roots globally writable. A compromised plugin or application should not be able to modify another site’s code or read its environment files.

Separate secrets and databases

Store database credentials, API keys and private certificates outside publicly served directories. Use separate database users and least-privilege grants for unrelated applications. Restrict administrative interfaces by VPN, firewall policy or other access controls rather than relying on an obscure URL.

Use containers or separate daemons only when justified

Containers, dedicated service users and separate daemons can reduce the blast radius of a compromise, but they add memory, file-descriptor, update and monitoring overhead. Select the lightest boundary that meets the sites’ trust and compliance requirements. IP separation alone does not prevent one site’s process from accessing another site’s files if filesystem permissions are permissive.

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

Firewall and operational controls

  • Allow TCP 80 and 443 only where required; keep SSH restricted to trusted source networks when possible.
  • Apply equivalent rules to IPv4 and IPv6 rather than securing only the address family you test most often.
  • Back up site data, databases and the web-server configuration separately, then test restoration.
  • Monitor disk space, memory, certificate expiry, error rates and each site’s availability.

HTTPS, redirects and certificate operations

Every HTTPS hostname needs a valid certificate and a key installed in the matching Apache virtual host or NGINX server block. Decide whether HTTP should serve content or redirect to HTTPS, and apply that policy separately to each hostname. A redirect configured on the wrong address can send visitors to another site or create a loop.

Certificate issuance can fail when DNS still points to an old address, an AAAA record reaches an unreachable IPv6 path, port 80 is blocked, or the server presents the wrong default host. Test both address families and check the certificate’s subject names after installation. Renew certificates before expiry and reload the web server only after the renewed files have correct ownership and permissions.

Troubleshooting by symptom

Symptom Likely cause Checks and fix
“Cannot assign requested address” when starting the server The address is not assigned or is not routed to the VPS Inspect interface addresses and provider routing; correct networking before changing the web-server file.
Both domains show the same site DNS records point to one address, or both requests match a default host Check A/AAAA answers, address-specific listeners, ServerName/server_name, and per-site logs.
Connection timeout Provider or operating-system firewall, wrong gateway, or missing route Test each address from an external network and open only the required port after routing is confirmed.
HTTP works but HTTPS fails No 443 listener, blocked port, missing certificate or hostname mismatch Validate the TLS block, firewall, certificate names and private-key permissions.
One domain works on IPv4 but not IPv6 Incorrect AAAA record, missing IPv6 binding or firewall rule Check the IPv6 route and listener separately; remove or correct the AAAA record until IPv6 is ready.
Changes have no visible effect Configuration was edited but not enabled or reloaded, or DNS caching remains Run the server’s config test, reload it, inspect logs and query authoritative DNS before waiting for resolver caches.
Server reload fails Syntax error, duplicate listen directive, missing file or invalid certificate path Read the exact test error, fix that item, rerun the test and reload only after success.

A repeatable deployment sequence

  1. Obtain written confirmation that the provider has allocated and routed every required address.
  2. Assign the addresses persistently to the VPS network interface and verify routes for both IPv4 and IPv6 where applicable.
  3. Create document roots, service users, permissions, application files and separate log paths.
  4. Create A and, when ready, AAAA records for each hostname and verify public DNS answers.
  5. Choose Apache or NGINX and create one address-specific HTTP configuration per site.
  6. Run the server’s configuration test, correct errors and reload.
  7. Test each hostname over HTTP, confirming content, status code and the intended log file.
  8. Add address-specific HTTPS configuration and certificates, then test renewal and redirects.
  9. Apply firewall, backup, monitoring and update policies to every site.
  10. Document the address-to-domain map so a future administrator can identify the correct listener quickly.

What the VPS provider still controls

The web server cannot create public addresses, alter upstream routing or guarantee reverse-DNS delegation. Those functions remain with the provider. Confirm the provider’s allocation limits, regional availability, reverse-DNS process, IPv6 support, bandwidth terms and backup behavior before migrating production domains. Current prices and address fees vary by provider, region and date, so they must be checked in the provider’s current account portal rather than inferred from a generic setup guide.

Once routing is correct, the rest of the design is ordinary virtual hosting: DNS directs a hostname to an address, the operating system accepts traffic on that address, and Apache or NGINX selects the matching site configuration. The same VPS can therefore host many independent websites without dedicating a separate machine to each one.

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.

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 *

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.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
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.