Simple nginx.conf.
- 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>/*.confdrop-ins.
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.