Last updated: · By Asael Dreyer
In short: Nginx is a web server and also a reverse proxy: software that takes the request from the visitor and decides whether to return a file itself or pass the request on. On Cloudways it is the first layer on the server, with Varnish and Apache working behind it. I checked this on my own server on 7 Nov 2026, through the headers and error pages it returns.
⏱ Reading time: 8 minutes · Difficulty: Intermediate · Last checked against my server and the official documentation: 7 Nov 2026
In short: Nginx on a Cloudways server (as of 7 Nov 2026)
| What it is | A web server, reverse proxy, cache and load balancer, open source |
|---|---|
| Version on Cloudways | Nginx 1.25.x, ports 80 and 443 (per KB 5116170) |
| Who else is in the chain | Varnish 6.0.x (cache) and Apache 2.4.x, and PHP-FPM behind them |
| Default | Hybrid Stack (Nginx plus Apache). The alternative: Lightning Stack, Nginx only |
| What I measured on my server | PHP 8.4 on FPM, Apache 2.4 behind Varnish, Cloudflare in front |
| .htaccess | Works only when Apache is in the chain (Hybrid). On Lightning you use Web Rules |
What is Nginx, and why is it on almost every server?
Nginx (pronounced “engine-x”) is open-source web server software. According to the official nginx site, it serves as an HTTP server, a reverse proxy, a caching layer, a load balancer and a mail proxy. It was originally written by Igor Sysoev and is distributed under a BSD license.
Its strength is handling many connections in parallel without using much memory. That makes it excellent in the role of the “doorman”: it receives every request, instantly returns static files such as images and CSS, and passes on to the layer behind it only what needs processing.
What is a reverse proxy, and how does it relate to Nginx?
A reverse proxy is a server that sits in front of another server and receives requests on its behalf. The visitor talks only to it, and it decides where to send each request and returns the response. In Nginx this is done with the proxy_pass directive, as described in the proxy module documentation.
On a WordPress server this means: Nginx handles the encrypted connection (HTTPS) and the files, and sends the PHP requests onward. That way the layers behind it do only the heavy work, and receive fewer requests.
How does Nginx work on a Cloudways server with Varnish and Apache?
On a Cloudways server with the Hybrid Stack, the request passes through several layers. According to the base packages article, Nginx serves static content, Varnish keeps copies of pages, and Apache runs the application. This is the order I saw on my server:
- Cloudflare (on my site, optional): receives the visitor at the edge of the network and can answer from its own cache.
- Nginx: the first layer on the server itself, on ports 80 and 443. It serves static files and blocks requests according to its own rules.
- Varnish: a cache of HTML pages. If a ready copy exists, the request goes no further. Details in the Varnish guide for Cloudways.
- Apache: reads .htaccess and passes the request to PHP.
- PHP-FPM and the database: this is where WordPress builds the page.
What did I see on my server on 7 Nov 2026?
I checked the chain in two ways, without changing anything on the server: reading the server variables from inside PHP (a read-only check), and curl requests from a computer in Israel, where I’m based. IP addresses and identifiers are not published here.
| What I checked | What I saw | What it means |
|---|---|---|
| The Server header in the response to a visitor | cloudflare | Cloudflare hides the origin server, so from the outside you do not see nginx |
| SERVER_SOFTWARE from inside PHP | Apache 2.4 (Debian) | PHP runs behind Apache, the last layer before the code |
| PHP interface | fpm-fcgi, version 8.4 | Apache hands off to PHP-FPM and does not run PHP inside itself |
| Headers that reached PHP | X-Varnish, X-Real-IP, X-Forwarded-For, CF-Connecting-IP | The request went through Varnish and through a proxy that added the visitor’s real address |
| curl to /.htaccess | 403 with the word nginx at the bottom | Nginx blocks the file before the request reaches Apache |
| curl to /wp-content/uploads/ | 403 from Apache, “Server at … Port 80” | Apache refuses to show a directory listing |
The last row is interesting: two different 403 pages on the same server, each from a different layer. It is the simplest way to tell who blocked you, and I covered it in the guide 403 Forbidden error: who is blocking and how to fix it.
Nginx or Apache: what is the difference, and which is better?
The big practical difference is the .htaccess file. Apache reads it in every directory, so WordPress plugins can write redirects and rules into it. Nginx does not read .htaccess, and all its settings live in the server configuration.
| Topic | Nginx | Apache |
|---|---|---|
| Typical role | Front end: HTTPS, static files, reverse proxy | Running the application and reading per-directory rules |
| .htaccess | Not supported | Supported, read on every request |
| Many parallel connections | Especially strong | Uses more resources |
| Changing settings without server access | No, needs server configuration | Yes, through .htaccess |
| On Cloudways | Always present | Present in the Hybrid Stack, not in Lightning |
There is no single winner here. The combination gives you both speed at the front and compatibility with plugins that write to .htaccess. The official Apache HTTP Server site documents this mechanism.
What is the Lightning Stack, and when should you switch to it?
The Lightning Stack is a mode where Nginx runs the application without Apache. According to the Cloudways article on changing the stack, in their load test (DigitalOcean Premium with 4 vCPU and 8GB, without Varnish and without an object cache) Lightning served 54% more requests and responded on average 19% faster.
That is a Cloudways measurement, not mine, and in a no-cache setup. On a site where most pages are served from cache, the difference you feel will be smaller. The switch is at the application level, so you can try it on one site on the server.
Before you switch, check .htaccess. The Cloudways article says explicitly that the main problem is 301 and 302 redirects or Rewrite rules written there. Move those first to Web Rules on Cloudways.
- Clone the application to a Staging environment and test there first.
- In the management panel, select the server and the application, then Application Management ← Application Settings.
- Open the Stack setting tab and choose Lightning Stack.
- Click Update Now and confirm with Proceed. According to Cloudways it takes about a minute, with no downtime.
- Check redirects, forms and the login page. If something breaks, go back to Hybrid on the same screen.
The code BFCM802 takes 80% off your bill for the first two months (up to $200 off per month), including unlimited free site migrations. New customers only, and only until the offer ends.
The offer ends on December 4, 2026 at 23:59 (UTC+2).
Start with a free trial, no credit card. Enter the code at checkout and check that it shows up.
After Black Friday: 30% off for 3 months with the code ASAEL. On a large server (above about $444 a month) ASAEL already saves more today. BFCM802 vs. ASAEL calculator
Start a free trial server, no credit card. When you move to a paid plan, the code ASAEL takes 30% off your bill for the first three months.
The link fills in the code on the signup form. Just make sure it shows up.
How do you check which server is answering you?
Three quick checks, from easiest to hardest. None of them changes anything on the site.
- The response headers: run the command below. If Server: nginx appears, you are talking directly to Nginx. If cloudflare appears, there is a CDN in front of the server.
- An error page: request a file that should not be accessible, such as /.htaccess. A page with nginx at the bottom shows that Nginx answered.
- From inside the server: over SSH run
dpkg -l | grep nginxto see the installed version, as the Cloudways base packages article suggests.
curl -sI https://example.com/ | grep -iE "^(HTTP|server|x-cache|cf-cache-status)"
curl -s https://example.com/.htaccess | grep -i nginx
For server access, see the guide to connecting over SSH on Cloudways. Most settings that do not require SSH, such as upload size and execution time, you change in the server settings.
Why does Nginx return 403 to AI bots?
Because the platform’s Nginx blocked them by User-Agent, before WordPress was even involved. On my servers, until 6 Nov 2026, ClaudeBot, CCBot and Amazonbot received a 403 with the word nginx when the request reached the server, while GPTBot and PerplexityBot received 200. On 7 Nov 2026, after a ticket, Cloudways support removed the block, and since then all three bots get 200 (as of 7 Nov 2026).
One more thing I found before the removal: when the page was already stored in the Cloudflare cache, even ClaudeBot got 200, because the request never reached Nginx at all. So the same bot saw part of the site and not another part. The full story, including the ticket, the response time and a before-and-after test, is on the page how I got the ClaudeBot block removed on Cloudways.
Common mistakes with Nginx on Cloudways
Redirects in .htaccess that stopped working: this happened after a move to the Lightning Stack. Nginx does not read the file, so move the rules to Web Rules or go back to Hybrid.
“I changed a setting and nothing happened”: sometimes Varnish or Cloudflare returns an old copy. Purge the cache in both layers before you conclude that the setting does not work.
Looking for nginx.conf: there is no root access, so no direct editing. What you can configure in the panel is in Web Rules, and what you cannot goes to support.
Came across an unfamiliar term? All the terms are explained in the web hosting glossary.
Frequently asked questions
Nginx (pronounced “engine-x”) is web server software that receives requests from the browser and returns pages and files. It can also pass requests to another server (a reverse proxy), keep copies in a cache and spread the load. It is open source and was originally written by Igor Sysoev.
Apache reads .htaccess files in every directory and lets you change settings without server access. Nginx does not read .htaccess, and its settings live in the server’s configuration files. On Cloudways the two work together: Nginx at the front and Apache behind it, unless you switch to the Lightning Stack.
Yes. According to the Cloudways base packages article, Nginx 1.25 is the front-end server on every server, on ports 80 and 443. The default for a new application is the Hybrid Stack, meaning Nginx plus Apache 2.4 and Varnish 6.0.
Not directly, because there is no root access to the server. Redirects, rewrites and HTTP headers are set in Web Rules in the panel, and with the Hybrid Stack you can keep using .htaccess. A change to the Nginx configuration itself goes through a support request.
It is an error page that Nginx itself returned, before the request reached WordPress. On my server I saw it when accessing .htaccess and on requests from certain AI bots. If there is no nginx line at the bottom, the block probably came from another layer, for example Cloudflare or Apache.
It is worth testing, not switching blindly. According to Cloudways, the switch takes about a minute, with no downtime, and you can go back. If you have 301 redirects or special rules in .htaccess, move them to Web Rules first, otherwise they will stop working.
Related guides
- Varnish on Cloudways: how the server cache works
- Web Rules: redirects and headers without .htaccess
- 403 Forbidden error: how to tell who is blocking
- AI bots and the Nginx 403
- Server settings on Cloudways
- If you are choosing a server: Flexible on Cloudways · my full review
Sources
- nginx.org – the official nginx site
- Module ngx_http_proxy_module – nginx documentation
- The Apache HTTP Server Project – Apache Software Foundation
- Which Base Packages Are Deployed With a Cloudways Server – Cloudways KB (Nginx, Varnish, Apache versions)
- How to Change Your Application Stack – Cloudways KB (Hybrid vs Lightning, test data)
- How to Create and Manage Web Rules in Cloudways – Cloudways KB
- What Can I Do With an .htaccess File? – Cloudways KB
The measurements on this page: curl requests from my own computer and reading server variables from inside PHP, on the cw-servers.com server, 7 Nov 2026. A single measurement point, not a performance test.
Official source: Which Base Packages Are Deployed With a Cloudways Server (Cloudways Knowledge Base). Written and checked by Asael Dreyer · Updated: 7 Nov 2026
Disclosure: this is an independent site, not the official Cloudways site. Some links on this site are affiliate links: if you sign up through them we earn a commission, at no extra cost to you. Full details