Nginx Config Generator

Generate a complete nginx server block for static files, PHP-FPM or a reverse proxy, with HTTPS, gzip, caching and security headers.

Describe your server

Lines: —
Location blocks: —
Extras: —
The generated file is a starting point: set the certificate paths and reload nginx after testing the syntax.

How to use the Nginx Config Generator

  1. Enter the domain name, document root and index files for the site.
  2. Pick static files, PHP-FPM or a reverse proxy and set the upstream target.
  3. Choose the HTTPS mode and extras, then copy the server block into your sites file.

Features

Advertisement

Frequently Asked Questions

Common questions about the free online nginx config generator.

A server block, also called a virtual host, tells nginx which domain names it answers and how to handle each request path.
You can generate a static file server, a PHP-FPM setup or a reverse proxy that forwards requests to an upstream service.
Choose the full option for a port 443 block with certificate paths, or the redirect option to send visitors from port 80.
It checks the requested file and directory first and then falls back to the front controller, which keeps clean URLs working.
On Debian and Ubuntu use sites-available with a symlink in sites-enabled, and on other systems include the file directly.
Yes, optional headers such as X-Content-Type-Options, X-Frame-Options and Referrer-Policy are added when the toggle is on.
It compresses text responses before sending them, which cuts the transfer size of HTML, CSS, JavaScript and JSON.
The generated access and error log paths live under the nginx log directory and use the domain name as the file prefix.
No. The file is generated in your browser and never sent anywhere.
Yes. It is free and unlimited, with no account required and no usage caps.

Last updated: October 10, 2026