Config Files · 1 file

Sample nginx.conf File

nginx is the most widely used web server and reverse proxy. Our sample is realistic and valid for its tool, with fake hosts and secrets.

nginx.conf · 1.3 KB

nginx.conf

An nginx server config with HTTP→HTTPS redirect, TLS, gzip, static caching, a reverse proxy to an app server and security headers. All hosts, keys and secrets are fake.

CC0 · free for any use · Verified by an independent tool · Report a problem

nginx.conf — first linesnginx
# Sample nginx configuration — samplefiles.com
user  nginx;
worker_processes  auto;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile      on;
    keepalive_timeout  65;
    gzip on;
    gzip_types text/plain text/css application/json application/javascript image/svg+xml;

    upstream app {
        server 127.0.0.1:3000;
        keepalive 32;
    }

    server {
        listen 80;
        server_name example.com www.example.com;
        return 301 https://$host$request_uri;

File details

Size
1.3 KB (1,432 bytes)
MIME type
text/plain
SHA-256
3cd0304fb34fb42c2496a5c51aeb019a270fe512b01f35123bea3cbe719f1f58
MD5
c35dc4d6a336a009eb92019ea12ba7bb

Download from the command line

curl -L -o nginx.conf https://files.samplefiles.com/config/nginx/nginx.conf

Or check the download in your browser with the checksum calculator.