What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Host multiple domains on one VPS by giving each site its own NGINX server block, document root, logs and (when appropriate) PHP-FPM pool. NGINX chooses a block from the request’s Host header, while TLS SNI lets each HTTPS domain use the right certificate on the same IP. Build the sites in HTTP first, verify DNS and PHP, then add certificates and redirects.
Need a server to try this on? Antihost offers Linux VPS plans with NVMe storage, full root access and a 14-day free trial.
How one VPS serves several domains
NGINX can define multiple virtual servers by placing multiple server directives inside the http context. Each block describes a domain’s names, files, routing and PHP hand-off. The browser sends a hostname in the HTTP Host header; NGINX uses that value to select the matching block. The official web-server guide documents this model at https://docs.nginx.com/nginx/admin-guide/web-server/web-server/.
As an Amazon Associate I earn from qualifying purchases.
How NGINX picks a server block
Matching is deterministic. NGINX checks an exact server_name first, then the longest matching wildcard, then the first matching regular expression; the search stops at the first applicable variant. See https://nginx.org/en/docs/http/server_names.html. If no name matches, NGINX sends the request to the default server for that listening port, as described at https://nginx.org/en/docs/http/request_processing.html?from=20423&from_column=20423. Make the default deliberate so an unknown hostname cannot accidentally expose another site.
How PHP is executed
NGINX does not run PHP itself. A PHP location forwards the request with fastcgi_pass to PHP-FPM over a Unix-domain socket or TCP address. fastcgi_param SCRIPT_FILENAME identifies the script PHP-FPM must execute. The directive behavior and parameter handling are documented in the FastCGI reference at https://nginx.org/en/docs/http/ngx_http_fastcgi_module.html.
#1 Best Overall
- [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.
How HTTPS works on one IP
During the TLS handshake, SNI carries the requested hostname. The server can therefore select the certificate and HTTPS configuration for each domain sharing the address. NGINX describes SNI as the general solution for several HTTPS servers on one IP at https://nginx.org/en/docs/http/configuring_https_servers.html?authuser=0.
Plan the VPS before writing configuration
Capacity is workload-specific. There are no universal site-count or visitor thresholds: measure CPU, memory, storage, PHP execution time and database load on the actual applications. Decide the following before creating blocks.
Free tools Windows power users keep installed
One-click scans. No signup required.
| Decision | Practical choice | Why it matters |
|---|---|---|
| Operating system | Use a currently supported distribution and its maintained NGINX, PHP and PHP-FPM packages. | Package names, service names, socket paths and FastCGI include files vary by distribution and PHP version. |
| Site layout | One document root per domain, such as /var/www/site-a/public and /var/www/site-b/public. |
Separate roots prevent one site’s files from being selected by another block. |
| Writable data | Give each application write access only to its upload, cache or other required directories. | Limiting write scope reduces the impact of a compromised application. |
| PHP model | Use a shared PHP-FPM pool for simplicity, or separate pools when isolation is worth additional memory and administration. | Pool choice affects failure blast radius, credentials and resource controls. |
| Addressing | Point every domain’s A and, if used, AAAA record to the VPS address. | HTTP and certificate validation must reach this machine for each hostname. |
| Operations | Plan per-site logs, backups, updates, firewall rules and log rotation. | Multiple sites multiply maintenance tasks even when they share one server. |
Install the supported packages
Install NGINX, PHP and the PHP-FPM service from the target distribution’s supported repositories. On a Debian-family system, the package names are commonly nginx, php-fpm and any application-specific PHP extensions; on an RPM-family system, use that distribution’s equivalent package names. Confirm the installed PHP-FPM service and socket instead of assuming a versioned path. Start and enable the services using the distribution’s service manager.
Create an isolated filesystem layout
Create a root for every site and keep application code separate from data that must be writable. A simple layout is:
/var/www/site-a/public # web-visible files for site-a.example
/var/www/site-a/storage # uploads/cache if the application needs it
/var/www/site-b/public # web-visible files for site-b.example
/var/www/site-b/storage
Ownership and permissions
Choose an ownership model deliberately. A deploy user can own the code while the PHP-FPM worker group receives write permission only on named storage directories. Do not make an entire document root world-writable. Ensure the NGINX worker can traverse parent directories and read public files, but cannot modify application code unless the application explicitly requires it.
Rank #2
- 【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.
Keep secrets out of the public root
Place environment files, database credentials and deployment keys outside public. If an application requires a configuration file beneath the root, add an explicit deny rule or follow that application’s documented safe layout. The safest arrangement is one in which a request can never map directly to a secret file.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Build one HTTP server block per domain
Start without HTTPS so DNS, host matching and PHP can be tested independently. The following pattern is intentionally illustrative: replace domain names, roots, include filenames and the PHP-FPM socket with values present on your VPS.
server {
listen 80;
server_name site-a.example www.site-a.example;
root /var/www/site-a/public;
index index.php index.html;
access_log /var/log/nginx/site-a.access.log;
error_log /var/log/nginx/site-a.error.log;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ .php$ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/run/php/php-fpm.sock;
}
location ~* .(css|js|jpg|jpeg|png|gif|svg|ico|webp)$ {
try_files $uri =404;
}
}
server {
listen 80;
server_name site-b.example www.site-b.example;
root /var/www/site-b/public;
index index.php index.html;
access_log /var/log/nginx/site-b.access.log;
error_log /var/log/nginx/site-b.error.log;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ .php$ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/run/php/php-fpm.sock;
}
location ~* .(css|js|jpg|jpeg|png|gif|svg|ico|webp)$ {
try_files $uri =404;
}
}
The front-controller fallback in location / is suitable only for applications that document that routing pattern. A simple static site can instead use try_files $uri $uri/ =404;. Do not send every arbitrary path to PHP: the explicit PHP location and a controlled static-file result prevent NGINX from treating unexpected filenames as scripts.
Use the correct FastCGI include
Use the maintained FastCGI parameter file supplied by your distribution, often named fastcgi_params or fastcgi.conf. POST requests need parameters including REQUEST_METHOD, CONTENT_TYPE and CONTENT_LENGTH; the distribution include normally supplies the standard set. If your package provides an application-specific include, follow its documented convention rather than copying a file from another operating system.
Find and verify the PHP-FPM socket
The socket in the example is not universal. List the runtime directory used by your distribution and inspect the PHP-FPM pool configuration to find the active listen value. It may be a versioned Unix socket such as /run/php/php8.x-fpm.sock, or a TCP address such as 127.0.0.1:9000. Set fastcgi_pass to exactly that value and make sure the NGINX worker has permission to connect.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Rank #3
- [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
Enable and validate the configuration
- Save each block in the directory your distribution loads from, commonly
/etc/nginx/sites-available/with a symlink into/etc/nginx/sites-enabled/, or a file under/etc/nginx/conf.d/. - Check syntax and referenced files with
sudo nginx -t. Fix every error before touching the running service. - Reload, rather than stop, NGINX after a successful test:
sudo systemctl reload nginx(use the service command provided by your distribution). - Repeat
nginx -tbefore every later reload. A failed test should leave the known-good configuration running.
Test host routing before DNS and certificates
When DNS has not propagated, send the intended Host header directly to the VPS address:
curl -i -H 'Host: site-a.example' http://203.0.113.10/
curl -i -H 'Host: site-b.example' http://203.0.113.10/
Replace the address with the VPS’s real IPv4 address. The two responses should come from different roots. Test each apex and www name that appears in server_name. A request with an unknown host should land in your intentional default server, not in a customer site.
Verify DNS records
Create the required A records and, only when the VPS is configured for IPv6, AAAA records. Query the records with your operating system’s DNS tools and test from more than one network if propagation is in doubt. Do not request certificates until every name on the certificate resolves to this VPS and reaches the correct block.
Use a harmless PHP probe
Create a temporary file such as /var/www/site-a/public/health.php containing a minimal PHP response, request it through the domain, and remove it immediately after confirming execution. A probe proves that NGINX selected the intended root, connected to PHP-FPM and passed the correct script filename; it does not validate the application’s database, sessions or upload handling.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchesAdd HTTPS for every hostname
Obtain a certificate covering each hostname you actually serve, using an ACME client or certificate process supported by your distribution and certificate authority. Create an HTTPS block for each site with its certificate, private key, root, PHP location and any application-specific settings. Keep private keys readable only by the account that needs them.
Rank #4
- 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.
Test SNI one domain at a time
Use a hostname-specific request such as:
curl -I --resolve site-a.example:443:203.0.113.10 https://site-a.example/
curl -I --resolve site-b.example:443:203.0.113.10 https://site-b.example/
The --resolve option pins the connection to the VPS while retaining the hostname used for SNI and certificate verification. Inspect the certificate and response for each domain separately. Also test the exact apex and www variants listed in each certificate.
Redirect HTTP only after HTTPS works
Once every HTTPS block responds correctly, change each port-80 block to a narrow redirect for its own names:
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallserver {
listen 80;
server_name site-a.example www.site-a.example;
return 301 https://site-a.example$request_uri;
}
Choose a canonical hostname deliberately; if both names should remain valid, redirect only the non-canonical one in a separate block. Test login callbacks, webhooks, uploads and any absolute URLs after enabling the redirect. Redirecting first can hide a broken certificate, wrong SNI match or incorrect application URL.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Choose shared or per-site PHP-FPM pools
A shared pool is the simplest arrangement: every site uses the same PHP-FPM worker account and socket. It consumes less memory and has fewer files to maintain, but a pool failure or poorly behaved workload affects all sites and file permissions are harder to isolate.
Per-site pools give each application a distinct Unix user, socket and worker limits. They reduce credential and failure blast radius and allow different PHP versions or limits where the operating system supports them. The trade-off is additional memory, configuration, monitoring and update work. Exact worker counts and memory limits must come from measurements of your applications and VPS, not a universal formula.
Best Value
| Criterion | Shared pool | Per-site pools |
|---|---|---|
| Memory use | Lower baseline because workers are shared. | Higher baseline as pools maintain separate workers. |
| Isolation | Applications commonly share a worker account and execution boundary. | Distinct users and sockets can separate applications and writable paths. |
| Failure blast radius | A pool outage or exhaustion can affect every site using it. | A failing pool is less likely to stop unrelated sites. |
| Operations | Fewer pool files, sockets and alerts. | More tuning, log review and lifecycle tasks. |
| Use when | Sites are trusted, similar and the VPS is small. | Sites have different owners, risk levels, traffic patterns or PHP requirements. |
Point a site at its own pool
Define a pool with a unique user, group and listen socket, then set that socket in the site’s fastcgi_pass. Ensure the socket directory permissions allow NGINX to connect, reload PHP-FPM after validating its configuration, and test the site before moving on to the next pool. Never copy a socket path from another server without checking that it exists locally.
One VPS or several?
Combining sites on one VPS saves the overhead of multiple operating systems and network endpoints, but all applications share CPU, memory, storage performance and the host’s maintenance window. Separate VPS instances cost more and require more patching, yet they isolate credentials, resource contention and outages.
| Axis | One VPS | Separate VPS instances |
|---|---|---|
| Cost | One base server and one set of infrastructure services. | Several server bills and usually duplicated monitoring and backups. |
| Maintenance | Centralized updates and configuration; a mistake can affect every site. | Changes are contained but must be repeated and tracked. |
| Noisy-neighbor risk | One busy application can consume shared resources. | Resource contention is largely confined to each instance. |
| Credential isolation | Requires careful users, permissions and pool boundaries. | Network and operating-system boundaries provide stronger separation. |
| Recovery | A host failure takes all sites offline unless backups or replicas are ready. | One instance can fail while others remain available. |
Choose one VPS when the applications are compatible and you can monitor and limit them. Split workloads when owners, compliance requirements, update schedules or resource profiles are materially different.
Harden and operate the multi-site server
Limit the attack surface
- Allow only required inbound ports in the firewall, normally SSH, HTTP and HTTPS; restrict SSH administration by source network where practical.
- Keep the operating system, NGINX, PHP, PHP-FPM and application dependencies patched.
- Disable PHP execution in upload directories with an explicit location rule or application-supported layout.
- Use least-privilege users and avoid granting the web worker unrestricted shell or database access.
- Review enabled modules and remove sample files, installers and temporary probes.
Control requests and resources
Set request-body, timeout and upload limits to the needs of each application. Tune PHP-FPM worker limits, NGINX connection settings and operating-system limits from observed CPU, memory, latency and queue data. There is no safe universal value: an upload-heavy site and a mostly static site need different settings. Keep enough headroom for deploys, backups and traffic spikes.
Separate logs and monitor them
Use an access and error log per site so a failing application can be identified without wading through unrelated traffic. Configure log rotation before disks fill. Watch for repeated upstream errors, permission failures, unusual status-code spikes, PHP-FPM queue growth and storage exhaustion. Correlate timestamps across NGINX, PHP-FPM and application logs.
Back up what is difficult to recreate
Back up databases, uploaded files, application configuration and the NGINX/PHP-FPM configuration. Store at least one copy outside the VPS and test restoration; a backup that has never been restored is only an assumption.
Quick Recap
Troubleshoot by symptom
| Symptom | Likely checks | Remedy |
|---|---|---|
| Every domain shows the same site | Inspect server_name, DNS, the request’s Host header and the default server. |
Correct names and records, remove duplicates, and test with curl -H 'Host: ...'. |
| Unknown hosts expose a real site | Check which block is default for port 80 or 443. | Create an intentional default server that returns a controlled response. |
| 502 Bad Gateway | Check PHP-FPM service state, the exact socket/TCP address and socket permissions. | Start the matching service, correct fastcgi_pass, and reload after nginx -t. |
| PHP downloads as text | Confirm the PHP location is loaded and that requests reach the intended block. | Fix the location or include, verify fastcgi_pass, then retest a temporary probe. |
| 404 for existing files | Compare root with the actual path and inspect try_files. |
Correct the document root, file permissions or application front-controller rule. |
| 403 Forbidden | Check parent-directory traversal, file ownership, mode bits and mandatory access controls. | Grant read/traverse access without making the whole tree writable. |
| POST or login fails | Review FastCGI parameters, request limits, session storage and application logs. | Use the maintained parameter include and confirm REQUEST_METHOD, CONTENT_TYPE and CONTENT_LENGTH reach PHP. |
| Certificate for the wrong domain | Test each hostname separately and inspect SNI, certificate names and the 443 server_name. |
Install a certificate covering that name and correct the matching HTTPS block. |
| Redirect loop | Compare NGINX redirects with the application’s trusted-proxy and HTTPS settings. | Keep one canonical redirect and configure the application to recognize the HTTPS scheme. |
Deployment checklist
- Install supported NGINX, PHP and PHP-FPM packages and confirm the active service and socket.
- Create a separate document root, ownership model, writable directories and logs for each site.
- Add one port-80 server block per domain, including every apex and
wwwname you intend to serve. - Use a maintained FastCGI include, an explicit
SCRIPT_FILENAMEand the verified PHP-FPM endpoint. - Choose static-file or application-specific routing; do not pass arbitrary paths to PHP.
- Run
nginx -t, reload, and test each hostname with an explicit Host header. - Point A and AAAA records to the VPS, verify resolution, and test the real names.
- Install certificates and HTTPS blocks, then test SNI for every hostname.
- Enable HTTP-to-HTTPS redirects only after HTTPS, logins, uploads and callbacks work.
- Set least-privilege permissions, firewall rules, updates, log rotation, resource limits and tested backups.
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.




