October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
VGSources
Blog

Best Way to Host Multiple Static and CMS Websites on One VPS

Host multiple domains on one VPS with DNS plus name-based Nginx server blocks or Apache virtual hosts, separate site roots and credentials, private CMS services, Certbot HTTPS, and measured capacity planning.
Length11 min Posted Quest giverVGSources Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The most reliable design is one VPS with Nginx or Apache as the public edge, DNS records for every domain, and a separate name-based server block (or virtual host) for each site. Serve static files directly from each site’s document root. Forward CMS requests to PHP-FPM, Apache, or an application container. Keep every site’s files, credentials, database, logs, and deployment settings separate; use Docker Compose when you need stronger process and dependency isolation. Add HTTPS with Certbot, expose only the ports you actually need, and size the VPS from measured CPU, memory, database, storage-I/O, and traffic demand rather than an invented site-count limit.

What you are building

Several domains can share one public IPv4 address (and, where available, one IPv6 address) because the web server selects a site from the hostname in the request. The Apache Software Foundation defines a virtual host as “the practice of running more than one web site on a single machine.” In Nginx terminology the equivalent unit is a server block. The routing chain is:

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.
  1. A visitor requests a domain such as news.example.
  2. That domain’s DNS A and/or AAAA record resolves to the VPS address.
  3. The request arrives on port 80 or 443.
  4. Nginx or Apache matches the Host name and selects that site’s configuration.
  5. Static assets are read from that site’s root; dynamic CMS requests are passed to the appropriate application upstream.

Nothing about this arrangement requires one VPS per domain. The isolation work happens in your directory layout, Unix users and permissions, application services, databases, secrets, logs, and backup plan.

Recommended architecture for mixed static and CMS sites

Use a single public reverse proxy and keep workloads behind it. A practical layout is:

#1 Best Overall
Sale
Gaoye Blue Light Blocking Glasses
  • BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
  • EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
  • COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
  • LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
  • WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.
Layer Responsibility Public exposure
DNS Maps every domain and required subdomain to the VPS Public DNS only
Nginx or Apache TLS termination, hostname routing, static files, and proxying Ports 80 and 443
Static sites HTML, CSS, JavaScript, images, and downloads in separate roots Through the proxy
CMS applications WordPress, Drupal, or another PHP/application service Private localhost or container network
Databases and caches One database/schema and credentials per site where practical Internal network only
Administration SSH, deployment hooks, monitoring, and backups Restricted by firewall and policy

Nginx is especially convenient when the edge should serve static content and reverse-proxy several application services. Apache is a sensible choice when existing CMS workflows depend on .htaccess files or operators prefer Apache’s per-directory configuration. WordPress documentation notes that Nginx can run alone or in front of Apache, but Nginx has no .htaccess equivalent: rewrite and access rules must be maintained by the administrator.

Nginx versus Apache at the edge

Decision factor Nginx Apache
Static delivery Direct file serving is a core use case and works well for many domains. Also serves static files directly, with a larger module and configuration ecosystem.
Reverse proxying Clear server-block and upstream model for containers, PHP-FPM, or another web server. Can proxy applications and can also sit behind Nginx.
Per-directory overrides No .htaccess; all rules live in central configuration. .htaccess compatibility helps CMS installations that expect it.
Operational style Centralized, explicit configuration and graceful reloads. Familiar to teams already managing Apache virtual hosts and modules.
Best fit Mixed static sites and multiple isolated upstream services. Existing Apache skills, legacy rewrite rules, or software requiring Apache behavior.

Do not run both merely because a tutorial shows both. A two-tier Nginx-plus-Apache design is useful when a CMS needs Apache compatibility, but it adds another process, configuration set, log path, and failure point. Choose one public edge first, then add an internal Apache service only for a demonstrated compatibility reason.

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

Plan names, directories, users, and secrets before installing sites

Give every site a distinct root

Use a predictable path such as /srv/www/site-a/public and /srv/www/site-b/public. Never point two domains at a shared writable directory unless that is an intentional, documented multi-site application. A separate root prevents an upload, deployment mistake, or incorrect rewrite rule from exposing another site’s files.

Separate Unix ownership and permissions

Run deployments and application processes with the least privilege they need. The web process should read static files; only upload or cache directories should be writable, and only when the CMS requires it. Keep private configuration, environment files, and database passwords outside publicly served roots. Separate service accounts reduce the chance that a compromised site can modify a neighbor.

Rank #2
Windex Gaming Cleaning Wipes, Pre-Moistened Wipes to Instantly Clean all Gaming Gear and Electronics, Resealable Packaging for a Freshness Lock, 25 count (Pack of 1)
  • WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
  • AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
  • PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
  • ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
  • COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed

Separate logs and deployment configuration

Assign access and error logs to each hostname. Per-site logs make it possible to identify a noisy crawler, failed deployment, or PHP error without mixing evidence from every domain. Keep each site’s deployment script, dependency lockfile, and rollback target distinct as well.

Use one database and credential set per CMS

A single database server can support many sites, but each application should have its own database (or at least its own database user with narrowly scoped privileges). Store credentials in root-readable files or a secrets mechanism, not in a document root or a public repository.

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

When Docker Compose is the better isolation boundary

Docker describes Compose as a tool for defining and running multi-container applications. A Compose project can package a CMS, its PHP or application runtime, a database, and a cache as services connected to private networks and backed by named volumes. The front proxy remains the only service bound to public ports.

A useful pattern is one Compose project per CMS, or one carefully designed project with clearly separated services:

Rank #3
Sale
LISEN Cell Phone Stand Phone Holder for Desk, Office Decor Gadgets for Men
  • Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
  • Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
  • Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
  • ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
  • Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)
  • Proxy network: the edge can reach only the application HTTP endpoints it must publish.
  • Application network: the CMS can reach its database and cache without exposing them to the Internet.
  • Named volumes: persistent uploads and database data survive container replacement.
  • Environment and secrets: credentials are injected without placing them in an image or public directory.
  • Versioned files: the Compose YAML and image versions provide a repeatable deployment and rollback description.

Containers do not remove the need for patching, backups, resource limits, or permission design. They add process and dependency separation, but a misconfigured bind mount or an exposed database port can still defeat that isolation.

Step-by-step: put several domains on one VPS

1. Confirm the VPS and operating prerequisites

  • Use a supported Linux distribution with security updates.
  • Reserve enough disk for site files, databases, logs, container images, and at least one local backup staging area.
  • Create an administrative account with SSH keys and limited sudo access.
  • Enable a firewall and plan to allow inbound TCP 80 and 443. Keep SSH restricted to the addresses or access method your policy permits.
  • Decide whether the edge will be Nginx, Apache, or Nginx in front of a specific internal Apache service.

2. Create DNS records for every hostname

For each domain, create an A record pointing to the VPS’s IPv4 address and an AAAA record only when the VPS and firewall support IPv6 correctly. Include the hostnames visitors will use, such as www or blog. Wait until public DNS resolvers return the VPS address before requesting certificates. A virtual host cannot route a name that resolves somewhere else.

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

3. Install and verify the edge server

Install the chosen web server from your distribution’s maintained package source, start it at boot, and validate its configuration before every reload. On Nginx, a typical validation command is nginx -t; on Apache, use the distribution’s configuration-test command (commonly apachectl configtest). Treat a failed test as a deployment failure and do not reload the service until it passes.

4. Add one server block or virtual host per site

Give each site an explicit hostname list, document root, log files, and application target. A minimal static Nginx block illustrates the separation:

Rank #4
Ledagic IC+RGBW USB Powered Led Light Bar with App & Remote Control, 2 Pack
  • Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
  • Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
  • 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
  • Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
  • USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC
server {
    listen 80;
    server_name example.net www.example.net;
    root /srv/www/example.net/public;
    index index.html;

    access_log /var/log/nginx/example.net.access.log;
    error_log  /var/log/nginx/example.net.error.log;

    location / {
        try_files $uri $uri/ =404;
    }
}

Replace the domain, paths, and logging policy for each site. Do not copy a PHP handler into a static site unless it genuinely needs one. For an application, use a separate upstream target, such as a local PHP-FPM socket, an internal Apache listener, or a container name on the proxy network. Keep that target private; the public server block should be the only Internet-facing entry point.

5. Test routing before adding application complexity

Place a distinct test file in each static root and request every hostname over HTTP. Confirm that the expected content and log file change. Test an unknown hostname and ensure it does not reveal a real site or administrative directory. This catches DNS and default-server mistakes before CMS installation obscures the result.

6. Deploy CMS services independently

Install each CMS in its own application directory or Compose project. Give it its own database credentials, uploads path, cache settings, and update process. Configure the edge to proxy only the CMS hostname to its internal service. If a CMS needs background workers, scheduled tasks, or a queue, run them as separate supervised services rather than exposing an additional public port.

HTTPS for several domains with Certbot

Certbot provides plugins for both Nginx and Apache. The workflow is the same regardless of how many domains you host:

Best Value
Sale
HUANUO FlowLift™ Dual Monitor Stand, Fully Adjustable Gaming Monitor Desk Mount for 13–32″ Computer Screens, Full Motion VESA 75x75/100x100 with C-Clamp & Grommet Base, Each Arm Holds 4.4 to 19.8 lbs
  • Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
  • Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
  • Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
  • Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
  • Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.
  1. Make sure each domain resolves to the VPS and that port 80 is reachable for the selected validation method.
  2. Install Certbot and the plugin matching the edge server.
  3. Request certificates covering the exact hostnames you operate. You can issue separate certificates per site or group names that share a lifecycle; separate certificates limit the impact of one domain’s renewal problem.
  4. Use the plugin’s optional web-server installation only after reviewing the proposed changes. Verify that the resulting HTTPS server block points to the correct root or upstream.
  5. Test with an HTTPS request to every hostname, including redirects from HTTP if that is your policy.
  6. Run the renewal test supplied by Certbot, then validate the web-server configuration and perform a graceful reload after a real renewal.

Protect private keys with restrictive filesystem permissions and ensure backups of certificate configuration do not become world-readable. Certificate automation is not a substitute for monitoring: alert on failed renewal jobs and inspect expiry dates before they become an outage.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

How many websites can a VPS handle?

There is no honest universal number, and the official guidance reviewed for this topic publishes no RAM-to-site-count statistic. A static brochure site may consume little CPU when files are cached, while one busy CMS can exhaust memory or database I/O on an otherwise idle server. Capacity is determined by the combined workload, not by the domain count.

Resource or behavior What increases demand What to measure
CPU PHP workers, image processing, search indexing, compression, and container workloads Sustained utilization, load average, and process-level usage during peaks
Memory PHP worker counts, database buffers, caches, plugins/modules, and multiple runtimes Used memory, swap activity, and out-of-memory events
Database and storage I/O Uncached queries, writes, media uploads, backups, and log volume Latency, queue depth, I/O wait, and free disk
Concurrency Traffic bursts, slow clients, crawlers, and simultaneous admin jobs Active connections, request latency, and upstream queueing
Network Large downloads, video or image delivery, and backup transfers Bandwidth rate, transfer caps, and packet errors

A 2 GB VPS may be comfortable for several low-traffic static sites and a lightly used CMS, but that is a workload hypothesis, not a guarantee. A 4 GB VPS provides more room for application workers, databases, and filesystem cache, yet a single high-traffic or poorly optimized CMS can still become the bottleneck. Start with measured usage, keep headroom for deploys and traffic spikes, and resize vertically or split workloads when contention is sustained.

Backups, updates, and recovery

Back up the three things that must be restored

  • Site data: document roots, uploads, generated assets, and container volumes.
  • Databases: logical dumps or a consistent database backup for every CMS.
  • Configuration: server blocks, TLS and Certbot state, Compose files, environment definitions, firewall rules, and deployment scripts.

Keep backups independent by site so one restoration does not overwrite unrelated domains. Store at least one copy away from the VPS, encrypt sensitive backups, and test a complete restoration on a separate environment. A backup that has never been restored is only an assumption.

Define an update and rollback path

Patch the operating system, edge server, runtimes, CMS core, extensions, and container images on a schedule. Capture a database backup and a known-good application version before major updates. Deploy one site at a time, run configuration tests, check logs, and retain the previous release so a failed update can be reversed without touching other domains.

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.

Common failure modes and fixes

Symptom Likely cause Action
The wrong site appears DNS still points elsewhere, the hostname is missing, or the default server catches the request. Check A/AAAA answers, the exact server_name or ServerName, enabled configuration, and the default-site policy.
HTTP works but HTTPS fails Certificate issuance or the 443 server block is incomplete. Confirm DNS and port 80 validation, inspect Certbot output, test configuration, and reload gracefully.
Every CMS returns 502/503 The proxy target is stopped, listening on the wrong address, or unreachable from the proxy network. Check service health, socket or container name, internal connectivity, and the edge error log.
Static assets return 403 Incorrect root path or filesystem permissions. Verify the file exists, parent directories are searchable, and the web process has read access without granting broad write access.
Memory fills during traffic spikes Too many application workers, an oversized database workload, or unbounded containers. Measure per-service memory, cap workers and container resources, enable appropriate caching, and scale or split the busiest workload.
Renewal succeeds but the old certificate remains active The service was not reloaded or the active configuration points to another certificate path. Validate the active configuration, perform a graceful reload, and confirm the served certificate externally.

Choosing the right operating model

Model Use it when Trade-off
Hand-managed server blocks and services You want maximum transparency and have a small, stable set of sites. Every site, certificate, runtime, and update must be configured and documented manually.
Control panel or CMS-focused automation Repetitive virtual-host, user, and HTTPS setup is the main burden. Convenience can hide configuration details and may constrain unusual proxy or deployment designs.
Docker Compose projects behind one proxy You need repeatable deployments, separate dependencies, and clear service boundaries. There are more moving parts: images, networks, volumes, resource limits, and container security.
Split across multiple VPS instances One workload regularly consumes the headroom needed by other sites, or availability boundaries matter. Higher cost and more systems to patch, monitor, back up, and secure.

Use the simplest model that provides the isolation and repeatability your sites require. Move a site to its own VPS when measured contention, security boundaries, maintenance windows, or recovery objectives justify the additional operational cost—not merely because the domain count has increased.

A practical launch checklist

  • Every domain has correct A/AAAA records and resolves to the VPS.
  • Each site has a unique root, Unix ownership, logs, deployment configuration, and application credentials.
  • Only the edge server is bound to public ports 80 and 443; databases and internal application ports are private.
  • Nginx or Apache configuration tests pass before reloads.
  • Static sites serve directly, and CMS hostnames reach only their intended upstream.
  • Certificates cover every production hostname, renew automatically, and have a tested renewal path.
  • Files, databases, and proxy/application configuration are backed up independently, with an exercised restore.
  • Monitoring records CPU, memory, swap, storage, I/O, latency, errors, certificate expiry, and backup success.
  • Capacity headroom is based on observed peaks, with a defined trigger for vertical scaling or workload separation.

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
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

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.