Docs cipi.yml Web panel API MCP Guides Compare GitHub Telegram channel
  1. Docs
  2. Domains & SSL
  3. Nginx

Nginx

The default server and editing an app's Nginx config.

Domains & SSL

Cipi runs Nginx from nginx.org's mainline repository, hardened and kept patched. This page covers the security report, upgrades and the default server.

PHP and Nginx security
$ cipi nginx security
$ cipi php upgrade

Security report#

bash
cipi nginx security
ReportsWhy it matters
Installed version vs. the oldest with every known fixAre you exposed to a published CVE?
Whether the running binary is the one on diskAn upgrade isn't real until the old workers are gone
Every config file that turns HTTP/2 onMost recent HTTP/2 CVEs need it

Cipi's vhosts use listen 443 ssl; and never enable HTTP/2, which removes a whole class of vulnerabilities from a standard Cipi server. How Cipi handled the nginx 1.31.9 CVEs walks through a real case.

Upgrades#

Nginx is excluded from unattended upgrades so it never restarts unexpectedly. Patch it on your terms:

bash
cipi nginx upgrade [--yes]      # now
cipi autoupdate on nginx        # or nightly, automatically
Step 1 of 4apt upgrade nginx

Nginx is upgraded with apt; your nginx.conf and every vhost are kept.

If a long-lived connection (a WebSocket) keeps an old worker on the replaced binary, Cipi restarts Nginx instead of reloading (well under a second of interruption). A server found on Ubuntu's archive Nginx is moved to nginx.org mainline in one simulated-first transaction: if anything can't be done, nothing changes.

Default server#

bash
cipi nginx default-server status|on|off

On by default: requests for unknown hostnames, on HTTP and HTTPS, get an empty reply (444) instead of reaching one of your apps or a tenant resolver.

Custom Nginx config#

Cipi generates each vhost (/etc/nginx/sites-available/myapp) and regenerates it when you change aliases, PHP, SSL, redirects or proxies. Prefer Cipi's commands and cipi.yml routes over hand edits; if you must edit, test and reload:

bash
sudo nano /etc/nginx/sites-available/myapp
sudo nginx -t && sudo systemctl reload nginx

Hand edits are overwritten by the next regeneration. Keep them small and documented, and re-check with cipi nginx security.