Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Need a server to try this on? Antihost offers Linux VPS plans with NVMe storage, full root access and a 14-day free trial.
For a new Virtualmin server, choose the LEMP bundle during installation and let the automated installer configure Linux, Nginx, MariaDB, and PHP. Use PHP-FPM for every Nginx-hosted PHP site. The documented starting command is sudo sh virtualmin-install.sh --bundle LEMP. Begin with a fresh supported operating system, working DNS records, and enough memory: at least 1 GiB of RAM for a basic installation, or about 4 GiB or more for the full mail, filtering, and virus-scanning stack.
Switching an existing Apache installation is possible, but it is an advanced migration rather than a package swap. Apache must be disabled, dependent Virtualmin features adjusted, Nginx modules installed, and the global and per-domain Nginx features enabled. The LAMP-versus-LEMP decision is difficult to reverse after installation, so make it before deploying production domains.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →What the Virtualmin–Nginx–PHP stack does
Virtualmin supplies the hosting control plane: virtual-server creation, domain administration, mail and DNS integration, certificates, quotas, logs, and service toggles. Nginx handles HTTP and HTTPS requests. PHP-FPM executes PHP scripts in separate worker pools instead of using Apache’s mod_php model. MariaDB provides the database layer in the LEMP bundle.
A request for a PHP page normally follows this path: DNS points the hostname to the server; Nginx selects the matching virtual-server configuration; static files are returned directly; PHP requests are passed over FastCGI to that domain’s PHP-FPM pool; and the script’s response is returned through Nginx. Separate pools allow a busy or compromised site to be isolated from other sites and give you a place to set per-site worker and resource limits.
#1 Best Overall
Virtualmin explicitly recommends PHP-FPM because separate process pools improve isolation, security, stability, and resource management in shared hosting. That recommendation is particularly relevant to Nginx, which does not use Apache’s PHP module.
Check prerequisites before installing
Use a fresh supported operating system
Deploy Virtualmin on a newly installed, currently supported Linux distribution rather than on a server that already contains a hand-built web stack. Remove or avoid pre-existing Apache, Nginx, alternate PHP packages, control panels, and custom firewall rules that could make the installer interpret the system incorrectly. Apply the operating system’s security updates, set a correct hostname, and make sure you have root or sudo access.
Provide DNS before creating sites
Create A or AAAA records for the server hostname and the domains you will host. They must resolve to the new server before you test HTTP, issue certificates, or troubleshoot an apparent Nginx failure. If you plan to receive mail, publish the required MX and related records separately; a web-only server does not need local mail services.
Budget memory for the services you select
| Deployment | Documented memory guidance | Services and trade-off |
|---|---|---|
| Basic Virtualmin installation | At least 1 GiB RAM (Virtualmin guidance, 2026) | Suitable for a small web stack when traffic and background services are limited. |
| Full installation | About 4 GiB RAM or more (Virtualmin guidance, 2026) | Includes the broader hosting stack, including mail handling, spam filtering, and virus scanning; it consumes materially more memory. |
| Mini installation | No separate minimum stated; size it for your sites and PHP workers | Retains the web stack while skipping local mail handling, spam and virus filtering, local DNS, FTP, and Jailkit. |
Memory is not just an installer requirement. Each PHP-FPM pool can create multiple workers, and mail filtering or antivirus processes can consume substantial bursts of RAM. Leave operating-system and database headroom instead of assigning all available memory to PHP.
Choose full or mini LEMP
Full installation
The full profile is intended for a server that will provide the services Virtualmin normally manages, such as local mail, DNS, FTP, and security filtering. It is convenient when one server is the authoritative home for all of those functions, but the documented approximately 4 GiB-or-more memory guidance should be treated as a floor for a full stack, not a performance guarantee.
Mini installation
Use the mini profile for a web-focused VPS when DNS, mail, FTP, and filesystem jail functions are provided elsewhere or are not needed. The installer supports the --type mini option. This reduces background services and attack surface, but you must arrange any omitted function independently if a hosted application requires it.
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 matchPC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Rank #2
Install a new server with the automated LEMP bundle
Virtualmin’s automated route is the recommended path because it selects compatible packages, configures the package manager, and installs required dependencies. Obtain the current installer from Virtualmin’s official download page, upload it to the fresh server, and run it as root or through sudo.
- Confirm the host. Verify the hostname, forward and reverse DNS where applicable, current security updates, accurate system time, and a root-capable shell.
- Download the current installer. Keep the script supplied by Virtualmin rather than reusing an old copy. Review any release notes that accompany the version you downloaded.
- Run the LEMP profile. For a normal full installation, execute
sudo sh virtualmin-install.sh --bundle LEMP. The bundle means Linux, Nginx, MariaDB, and PHP. - Select mini only when appropriate. To omit local mail, spam and virus filtering, local DNS, FTP, and Jailkit, use
sudo sh virtualmin-install.sh --bundle LEMP --type mini. - Allow the installer to finish. It may configure repositories, install Nginx and PHP packages, create or update Virtualmin and Webmin configuration, and enable services. Do not interrupt it while package transactions are running.
- Record the generated administration details. Store the Webmin/Virtualmin URL, credentials, hostname, and any certificate or firewall notes in a password manager. Change temporary credentials immediately.
- Log in and create a test virtual server. Add one domain whose DNS already points to the machine. Confirm that Nginx serves a static file before adding an application, database, or reverse-proxy rule.
Do not install LAMP first with the intention of changing it later. Virtualmin’s current documentation says the LAMP/LEMP bundle choice cannot be switched after installation without significant manual work.
Complete the first Virtualmin configuration
Set the server identity
In the Webmin or Virtualmin administration interface, confirm the fully qualified hostname, system DNS resolver, time zone, and outbound hostname. A mismatch between the hostname used by the operating system, DNS, and TLS certificates can produce mail warnings and certificate errors even when a website itself loads.
Create the virtual server
Use the virtual-server creation screen to enter the primary domain, administrator password, Unix owner, home directory, and database options. Leave the generated Nginx configuration under Virtualmin’s control unless you have a documented reason to add a custom include. Create aliases and subservers through Virtualmin so they receive the same certificate, log, and PHP feature handling.
Issue HTTPS after DNS resolves
Once the domain resolves to this server, request a certificate through Virtualmin’s certificate controls and select the Nginx SSL feature for the virtual server. Test both HTTP and HTTPS, then decide whether HTTP should redirect to HTTPS. A failed certificate request is usually a DNS, firewall, or incorrect virtual-server hostname problem rather than a PHP-FPM problem.
Enable PHP-FPM for Nginx sites
Use the recommended execution mode
In the selected virtual server’s feature or website options, enable PHP and choose PHP-FPM rather than an Apache-only execution mode. Menu names vary slightly by Virtualmin release, but the feature is normally exposed from the virtual server’s Features and Plugins or PHP options screen. After saving, Virtualmin should generate the Nginx FastCGI settings and an FPM pool for that site.
Understand pool isolation
A separate pool gives each domain its own Unix user, socket or listening endpoint, worker count, and limits. This prevents one site’s PHP processes from automatically running as another site’s account. It also makes resource tuning possible: a low-traffic brochure site can use a small pool, while a busy application can receive more workers if the server has spare memory.
Do not set every pool to a large worker count. A rough capacity check is the number of possible workers multiplied by the peak memory used by one PHP process, plus Nginx, MariaDB, the operating system, and any mail or filtering services. If that total approaches installed RAM, reduce worker limits or move the workload to a larger server.
Configure PHP versions and settings
Install only PHP versions supported by the operating system and by your applications. Select the required version in the virtual server’s PHP settings, then restart or reload the corresponding PHP-FPM service when Virtualmin requests it. To identify service names on a distribution with versioned units, run systemctl list-units 'php*-fpm.service'.
Be careful with configuration scope. Virtualmin notes that changing the system-wide /etc/php.ini does not automatically change every virtual server’s individual php.ini. Settings intended to propagate across domains can be placed in the appropriate per-version .ini files, while application-specific values should be set for the individual virtual server or in its project configuration. After a change, verify the effective value from the site’s PHP runtime rather than assuming the file was read.
Verify Nginx, PHP-FPM, and DNS
- Check services. Run
sudo systemctl status nginxand the versioned PHP-FPM unit identified earlier. Both should be active without repeated restart failures. - Validate Nginx syntax. Run
sudo nginx -t. Fix the file and line reported by the command before reloading; never reload a configuration that fails this test. - Reload safely. After a successful test, use
sudo systemctl reload nginx. Reloading keeps existing connections where possible, while a full restart is more disruptive. - Test name resolution. From a separate machine, use
dig +short example.comor an equivalent DNS lookup and confirm the expected public address. - Test static content. Place a small, non-sensitive HTML file in the virtual server’s document root and request it over HTTPS. A static-file failure points to DNS, the server block, filesystem permissions, or TLS before it points to PHP.
- Test PHP temporarily. Create a file containing
<?php echo PHP_VERSION; ?>, request it, and remove it immediately after testing. Do not leave a diagnostic page such asphpinfo()publicly accessible because it exposes paths, modules, and configuration details. - Read the right logs. Inspect the virtual server’s Nginx access and error logs and the PHP-FPM journal at the exact time of a failed request. A timestamp and request path are more useful than a generic browser error.
Migrate an existing Apache-based Virtualmin server
Migration is technically complex because Apache is tied to existing websites and Virtualmin features. Make a full backup, schedule a maintenance window, and test one low-risk domain first. Do not perform the following steps on a production system without a rollback plan.
1. Disable Apache
On Debian-derived systems, stop and disable apache2:
Rank #4
sudo systemctl disable --now apache2
On Enterprise Linux-derived systems, use the httpd service:
sudo systemctl disable --now httpd
Confirm that ports 80 and 443 are free before starting Nginx. If another process owns either port, identify it with your distribution’s socket-listing tool and resolve the conflict rather than forcing Nginx to a nonstandard port.
2. Disable Apache-dependent website features
For every existing virtual server, disable the Apache website feature and review dependent features in Virtualmin. The documentation specifically calls out status monitoring, Awstats, and htpasswd as features that may need attention. Export any Apache-specific rewrite rules, authentication files, proxy directives, or custom includes before removing or replacing them; Nginx syntax is not interchangeable with Apache directives.
3. Install Nginx and the Virtualmin modules
Use the package names appropriate to the operating-system family:
Recommended Free Tools
| System family | Nginx and Virtualmin packages documented for migration |
|---|---|
| Debian derivatives | nginx-full webmin-virtualmin-nginx webmin-virtualmin-nginx-ssl |
| Enterprise Linux derivatives | nginx webmin-virtualmin-nginx webmin-virtualmin-nginx-ssl |
Install these through the configured package manager so dependencies and signing keys are handled correctly. Do not mix repositories intended for a different distribution release.
4. Run Virtualmin’s system configuration command
Execute:
sudo virtualmin-config-system --include Nginx
This asks Virtualmin to include Nginx in its managed service configuration. Review the command output for package or module errors before proceeding.
Best Value
5. Enable the global Nginx features
In Virtualmin’s global Features and Plugins controls, enable virtualmin-nginx and virtualmin-nginx-ssl. These global switches make the Nginx website and SSL integrations available to virtual servers; they do not, by themselves, convert every existing domain.
6. Enable Nginx features per virtual server
Open each existing virtual server and enable its Nginx website and Nginx SSL features. Regenerate or save the virtual-server configuration, then test with nginx -t. Convert domains one at a time so a bad custom rule does not take down every site.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Clear out junk files and repair common Windows errors3Scan for outdated or missing drivers - takes under a minute7. Recreate PHP execution through FPM
Enable PHP-FPM for each migrated domain and confirm that the generated FastCGI socket or endpoint exists and is readable by Nginx. Apache’s mod_php settings, per-directory overrides, and rewrite syntax do not automatically carry over. Translate application rules into Nginx configuration using Virtualmin’s supported custom directives, and keep a copy of the original Apache configuration until all domains pass testing.
Common failures and targeted fixes
Nginx returns 502 Bad Gateway
- Check that the domain’s PHP-FPM unit is running and that its socket exists.
- Compare the socket path in the Nginx error log with the path configured for the pool; a stale path often means the PHP version changed without regenerating the virtual-server configuration.
- Check permissions on the socket and parent directories. Nginx must be able to connect, while PHP should still run as the site’s account.
- Review the FPM journal for startup errors, exhausted process limits, or a missing extension.
PHP source downloads or appears as plain text
This indicates that the request is being served as a static file instead of being passed to FPM. Confirm that PHP-FPM is enabled for the virtual server, that the Nginx configuration contains the generated FastCGI handling, and that the request is reaching the intended server block rather than a default site. Never leave source code exposed; stop the site until the routing is corrected.
The site shows the wrong PHP version or setting
Check the virtual server’s selected PHP version and the actual FPM unit handling its requests. Then inspect the effective configuration from the application or a temporary diagnostic page. A system-wide /etc/php.ini edit may not affect a domain-specific php.ini; use the appropriate per-version or per-domain setting and reload the relevant FPM service.
Nginx will not start after migration
Run sudo nginx -t and read the first reported error. Common causes are an Apache process still binding to port 80 or 443, duplicate server names, an invalid translated rewrite rule, or a missing SSL certificate path. Correct one error at a time and test again before enabling the service at boot.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Only some domains fail
Compare a failing domain with a working one: DNS answer, enabled Virtualmin features, document-root ownership, PHP-FPM pool state, SSL certificate, and custom directives. Per-domain conversion is safer than changing all generated files at once because it narrows the rollback scope.
DNS or HTTPS tests fail while local tests pass
A successful request to localhost does not prove public reachability. Verify the public A or AAAA record, firewall rules for ports 80 and 443, IPv6 routing, and whether a proxy or load balancer is presenting a different certificate. Wait for intentionally lowered DNS TTLs to expire before judging a change.
Quick Recap
Operate the server safely after configuration
- Patch regularly. Keep the operating system, Nginx, PHP, MariaDB, Webmin, and Virtualmin packages on supported security-update channels.
- Back up before changes. Back up Virtualmin metadata, databases, application files, certificates, and custom Nginx snippets before changing PHP versions or migrating domains.
- Limit administrative exposure. Restrict Webmin access, use strong unique credentials and multifactor authentication where available, and permit SSH only from trusted networks when practical.
- Watch resource use. Monitor RAM, swap, CPU, disk space, database connections, Nginx worker errors, and FPM pool saturation. Increase capacity only after identifying the limiting resource.
- Remove diagnostics. Delete temporary PHP test files and do not publish
phpinfo(). Keep logs protected because they may contain query strings, usernames, and application errors. - Document customizations. Record every manually added Nginx include, PHP override, firewall rule, and migration exception. Future Virtualmin regeneration can otherwise overwrite an undocumented change.
Decide which deployment path fits
| Situation | Recommended path | Why |
|---|---|---|
| New server with no existing control panel | Automated installer with --bundle LEMP |
It configures the package manager and dependencies and avoids an Apache-to-Nginx conversion. |
| Small web-only VPS | LEMP with --type mini |
It omits local mail, filtering, DNS, FTP, and Jailkit when those services are unnecessary. |
| Existing Apache Virtualmin server with many live domains | Planned manual migration | Apache-dependent features, custom rules, and every virtual server require review and testing. |
| Shared hosting with separate application owners | Nginx plus PHP-FPM pools | Per-site pools improve isolation and permit independent resource controls. |
Final pre-launch checklist
- Fresh supported operating system with current security patches.
- Hostname and hosted-domain DNS records resolve to the server.
- Memory matches the selected full or mini service profile.
- LEMP was selected during a new installation, or the documented migration sequence was completed.
- Nginx passes
nginx -tand starts without port conflicts. - Every PHP domain uses PHP-FPM and its pool is running.
- Static files, PHP responses, databases, redirects, and HTTPS have been tested from an external network.
- Temporary diagnostic files are removed and backups are verified.
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.

