Skip to content
This repository was archived by the owner on Dec 27, 2025. It is now read-only.

nilfalse/nginx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minimal nginx

Simple nginx.conf.

Features

  • Arch Linux & Ubuntu support out of the box.
  • Removed HTTP Server: header by default.
  • Cloudflare 1.1.1.1 as the default DNS resolver.
  • Slim – only the necessary defaults are overridden.
  • Highly customizable due to modular configuration approach.
  • Default server is encapsulated in /srv/http/default/.
  • Extra virtual hosts can be configured with /srv/http/www/<example.org>/*.conf drop-ins.

Default Server

Note

A default server is not part of this distribution.

Make sure you have at least the default server defined in your /srv/http/default/*.conf.

A good starting point would be to put the following in /srv/http/default/nginx.conf:

server {
    listen 80;
    listen [::]:80;

    server_name _;

    root /srv/http/default/public;

    location / {
        try_files $uri $uri/ =404;
    }

    error_page 404 /404.html;
    error_page 500 502 503 504 /50x.html;
}

You'll then need an index.html and two error pages 404.html and 50x.html in your /srv/http/default/public/ directory.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published