Nginx

A fast Nginx server, isolated sites

Every request to your site goes through Nginx - one of the fastest web servers in the world. Behind it, PHP-FPM runs each site as its own user, isolated from the others.

Technology

Web server

Nginx is server technology, not just a cache

Alongside LiteSpeed, Nginx is one of the fastest web servers in the world - and one of the most widely used on the web.

On our servers Nginx sits in front of Apache: it accepts every connection, handles encryption and serves images and stylesheets itself. Apache only handles pages WordPress has to build - and supports familiar .htaccess rules while doing so.

Thousands of connections at once

Nginx's event-driven architecture serves thousands of simultaneous visitors with little memory - at traffic peaks too.

Static files served directly

Images, stylesheets, scripts and fonts are served straight from Nginx, without needing PHP or Apache at all.

HTTPS and HTTP/2

Nginx handles encrypted connections and the HTTP/2 protocol, which loads a page's files in parallel over a single connection.

Front-end for Apache

Nginx passes dynamic requests on to Apache, so WordPress and plugin .htaccess rules work as before.

LiteSpeed-class speed

Nginx performs in the same class as LiteSpeed, and Nginx caching alongside it makes WordPress lightning fast.

Plain Nginx for Managed Cloud

On request we can run plain Nginx on Managed Cloud servers, handling PHP requests too - an even faster option without Apache.

How a request travels

Three layers behind every page load

The earlier a request is answered, the faster the page loads.

That is why each layer only handles what the previous one cannot: most requests never reach PHP at all.

1. Nginx receives

Nginx accepts the connection, decrypts it and serves images, styles and scripts right away.

2. Nginx caching answers

If a ready-made version of the page is cached, Nginx returns it directly - WordPress does not start at all.

3. PHP-FPM builds the page

Only new and personal pages, such as the checkout or dashboard, run on PHP-FPM - as the site's own user.

Nginx caching

Nginx caching stores ready-made pages on the server

Nginx caching is a separate server-level caching technology: it stores the pages WordPress builds and serves them to the next visitors without PHP or the database.

The Hostaan plugin keeps the cache up to date: when you publish or update content, outdated pages are purged automatically. Logged-in views, the cart and checkout bypass the cache - Redis object cache can speed those up when needed.

Nginx caching
No PHP

A page answered from cache does not start WordPress or run a single database query.

Always up to date

The Hostaan plugin purges changed pages from the cache automatically.

Checkout bypassed

The cart, checkout and logged-in views are always built fresh.

PHP-FPM and isolation

Every site in its own compartment

Even on shared hosting, your site is isolated from other sites at both the file system and the resource level.

Every primary domain has its own system user, and PHP-FPM runs the site's PHP with that user's permissions. Even if a WordPress site fell into an attacker's or a malicious bot's hands through a vulnerability, it could not reach other domains' files or WordPress installations.

Own system user

Every primary domain gets its own user, and all file permissions are based on that user only.

PHP-FPM as its own user

A site's PHP processes run as its own user, not as a shared web server user.

open_basedir restriction

PHP may only open files in the site's own directory - the restriction is on across all our servers.

CPU and RAM limits

Linux cgroups limits share CPU and memory fairly, so one site's traffic peak does not slow down its neighbours.

No open SSH access

SSH connections are not allowed on our servers, except on request as a chrooted shell that only sees the account's own files.

Damage stays contained

If a single site is compromised, isolation stops the attack from spreading to other sites on the same server.

Benefits

Fast, isolated, steady

Fast pages

Nginx and Nginx caching answer most requests without PHP.

Isolated sites

Own system user, PHP-FPM and open_basedir keep sites apart.

No noisy neighbours

CPU and RAM limits keep server performance steady for everyone.

Ready to use

Everything is on by default - there is nothing for you to tune.

Availability

Which services use this?

Nginx, Nginx caching and PHP-FPM isolation are on by default in all our WordPress services and cloud servers.

There is nothing to request or enable - it is already in place.

WP, SmartWP and SmartWoo

WordPress hosting

Nginx in front of Apache, Nginx caching, PHP-FPM as the site's own user, plus CPU and RAM limits in every plan.

WP hosting

Managed Cloud 3.0

Your own server

The same technology on your own server. On request also plain Nginx, handling PHP requests without Apache.

Managed Cloud 3.0

Reseller Cloud 3.0

For agencies

Your clients are isolated from each other, and in service plans you set CPU and RAM limits for each.

Reseller Cloud 3.0

Honestly

What Nginx does not do for you

Does not fix slow code

A heavy plugin or theme slows down pages that cannot be cached. A fast server does not replace optimising the site.

Does not cache logged-in users

Logged-in views, the cart and checkout are always built fresh. Redis object cache speeds those up.

Plain Nginx ignores .htaccess

In Managed Cloud's plain Nginx mode, .htaccess rules are not used, so we move them into the Nginx configuration when setting it up.

FAQ

Questions about Nginx and isolation

Nginx is the web server that receives every request, handles encryption and serves images and files. Nginx caching is a server-level cache running on top of it, which stores ready-made pages built by WordPress and serves them without PHP.

Both are among the fastest web servers and perform in the same class. In practice, site speed depends more on caching, disk and CPU speed and the site itself - which we take care of with Nginx caching, NVMe disks and the Hostaan plugin.

Yes. In our hosting Nginx sits in front of Apache, and Apache reads .htaccess rules as before. Only in Managed Cloud's plain Nginx mode, available on request, are the rules moved into the Nginx configuration.

Every primary domain has its own system user, and PHP-FPM runs the site's PHP with that user's permissions only. On top of that, open_basedir restricts PHP to the site's own directory. A compromised site therefore cannot read or modify other domains' files.

cgroups limits allocate CPU and memory to each subscription, so a single heavy site cannot take the whole server's resources. On Reseller Cloud you set the limits yourself in service plans.

Open SSH connections are not allowed on our servers. On request we enable a chrooted shell for the account, which only sees the account's own files and has WP-CLI, Git and Composer available.

See also

More technology from Hostaan

A fast and secure platform for WordPress

Nginx, Nginx caching and PHP-FPM isolation come as standard in every WordPress hosting plan. Pick the plan that suits your site.

See WP hosting