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
# 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
Download from the command line
curl -L -o nginx.conf https://files.samplefiles.com/config/nginx/nginx.confwget https://files.samplefiles.com/config/nginx/nginx.confhttps://files.samplefiles.com/config/nginx/nginx.confprintf '%s %s\n' 3cd0304fb34fb42c2496a5c51aeb019a270fe512b01f35123bea3cbe719f1f58 nginx.conf | shasum -a 256 -cOr check the download in your browser with the checksum calculator.