Nginx Configuration Cheatsheet | Fizzy
Updated at

Nginx Configuration Cheatsheet

To log some useful Nginx Server Configurations.

Rewrite

Between Websites

server {
    listen 80;
    server_name old.com www.old.com;
    return 301 $scheme://www.new.com$request_uri;
}

301 = permanent; 302 = temporary $scheme is used to define the protocol (HTTP or HTTPS) $request_uri enable redirct for the full url path.

e.g.: www.old.com/path/ -> www.new.com/path/

Fizzy

A beautiful, minimalist, and modern starter built with the best practices of the web.

@ 2026 Fizzy All rights reserved.

All systems running