Nginx

Updated 14 Nov 2026 Published

Nginx

Nginx is one of the three web servers VinzaPanel can run — the others are Apache2 and OpenLiteSpeed. You choose one in the setup wizard at first login, and every website on the server is then served by it. The Nginx page (sidebar Server → Nginx, /apps/nginx/) lets you watch and control the service, test and tune its configuration, add per-site caching and rate limits, and read its logs.

Note

A server runs exactly one web server. Nginx, Apache2 and OpenLiteSpeed conflict with each other, and the one that is not selected is kept stopped and disabled. If Nginx is not the selected web server, its menu entry carries an off badge and the page tells you so instead of letting you start it.

Choosing between the web servers

Web serverGood to know
NginxLightweight and fast. .htaccess files do not apply — use the website's Web Rules instead. Per-site microcache and rate limiting from this page.
Apache2Native .htaccess, broadest compatibility with PHP applications.
OpenLiteSpeedEvent-driven, reads the rewrite rules in .htaccess, built-in LSCache.

All three run PHP through the same per-user PHP-FPM pools, so the choice does not change how PHP is isolated (see PHP-FPM Configuration).

What the Nginx page does

Nginx app page with status, version, virtual host count and the Service control buttons

The status strip shows whether Nginx is running, its version, the web server mode and the number of virtual hosts. Below it are five tabs:

  • Overview — Service control (Start, Restart, Reload, Stop, Enable, Disable) and Test config, which runs nginx -t and shows its full output. Stop and Disable ask for confirmation first, because every website goes offline while Nginx is stopped. The Live metrics card shows active connections, requests per second, accepts, handled, requests, and reading/writing/waiting connections; click Enable live metrics once to turn on the status listener (loopback only, 127.0.0.1:61081).
  • Virtual hosts — the server blocks in /etc/nginx/sites-available and which ones are enabled (linked into /etc/nginx/sites-enabled). Open one to view or download it, or click Edit and then Save, test & reload: the file is checked with nginx -t, and if Nginx rejects it the previous file is restored and Nginx's error is shown.
  • Cache & limits — per-site microcache and rate limiting (see below).
  • Configuration — Common settings for Worker processes, Worker connections, Keepalive timeout, Max upload size (client_max_body_size), Show nginx version and Gzip compression. Values are validated, written, and checked with nginx -t; a rejected change is rolled back automatically. Below the form is a read-only view of nginx.conf.
  • Logs — tail the global error log or access log (100, 200 or 500 lines), with line wrapping and a download button.

Creating and removing sites is done in Websites, not here — the Manage websites button takes you there (see Creating Websites).

Website owners without administrator rights only see a reduced status view: no service buttons, no logs, no settings and no vhost list.

Note

New installations get a 50 MB upload limit by default (client_max_body_size 50m), set only where no value was configured yet. A value you change on the Configuration tab is never put back by a later update.

Microcache and rate limiting per site

The Cache & limits tab lists every Nginx website with two optional features, both off by default:

  • Microcache — keeps PHP or app responses for a short time (TTL 1–600 seconds). It is bypassed for logged-in WordPress/WooCommerce and session cookies, POST and other non-GET requests, query strings, Authorization headers and admin paths. Purge cache empties the cache of one site.
  • Rate limit — caps requests per second per client IP (req/s plus burst) and, optionally, simultaneous connections per IP (conn/IP, 0 = off). Requests over the limit get 429.

Click Save on the site's row. Every save is checked with nginx -t and rolled back if Nginx rejects it. The settings are stored per site and kept when the site's vhost is regenerated.

Updates

The Updates card at the top of the page shows whether a newer Nginx is available in the server's configured repositories. Check for updates refreshes the list and Update installs it; the configuration is tested before Nginx is reloaded.

Where things live

WhatPath
Site configuration (one file per domain)/etc/nginx/sites-available/<domain>.conf, enabled via a link in /etc/nginx/sites-enabled/
Extra rules per site (written by Web Rules)/etc/nginx/vinza-extra/<domain>-extra.conf
Per-site snippets written by apps (microcache, rate limits, blocked PHP folders)/etc/nginx/vinza-site/<domain>/
Per-site logs/home/<user>/logs/<domain>.access.log and .error.log
Document root (default)/home/<user>/web/<domain>
Warning

Edits to /etc/nginx/sites-available/<domain>.conf — by hand or with the vhost editor — are temporary. The panel rewrites that file whenever the site changes (PHP version, SSL, aliases, a web server switch), and the editor warns you about this. Put lasting custom directives in the site's Web Rules, which end up in the vinza-extra file and survive regeneration.

When a configuration test fails, the panel names the file and line, shows the lines around it and tells you which part of the panel wrote that file (the website's Web Rules, an app's per-site snippet, the website's own configuration or a server-wide file), so you know where to fix it.

Custom rules for a site (Web Rules)

Open the website (Websites → your domain) and choose Web Rules. The guided form covers the common needs without writing Nginx syntax:

  • Force HTTPS (the site needs an SSL certificate first), force www or non-www
  • Custom redirects
  • Block sensitive files such as .env, block dotfiles, block IP addresses
  • Password-protect the site (HTTP basic auth)
  • Browser caching for static files, maximum request body size (client_max_body_size)
  • Security headers such as X-Frame-Options and X-Content-Type-Options

Click Save & Apply; the configuration is tested and reloaded, and reverted if Nginx rejects it. On Nginx, the Raw Edit mode is restricted to administrators, because raw directives are included at server level. PHP values (memory_limit and so on) cannot be set through Web Rules on Nginx — see PHP-FPM Configuration.

Web Rules Manager dialog for a website, on the Upload tab with the upload and request size limits

Switching to another web server

To move from Nginx to Apache2 or OpenLiteSpeed, open the Vinza Store and use Replace (or Install (replaces active app)) on the other web server. The panel warns you before it continues:

  • the current web server package is removed together with its configuration directory;
  • every website on this server is moved across and its vhost is rewritten from the panel template — any hand-edited vhost is lost, and Nginx-only settings do not apply on the new server;
  • sites hosted on a remote node are not touched.

The panel keeps each site's Nginx Web Rules, microcache and rate-limit settings, so they come back by themselves if you later switch back to Nginx.

Tip

Take a backup before switching, and plan a short maintenance window: sites are briefly unavailable while the new web server is installed.

Useful commands

# Test the configuration
sudo nginx -t

# Service status
sudo systemctl status nginx

# Follow one site's error log
sudo tail -f /home/USER/logs/example.com.error.log
On this page