Skip to content

Instantly share code, notes, and snippets.

@DariuszO
Forked from kremalicious/nginx.conf
Created December 4, 2019 12:17
Show Gist options
  • Save DariuszO/37f7b5fd2fd20ad03c5c54ed01a3ed43 to your computer and use it in GitHub Desktop.
Save DariuszO/37f7b5fd2fd20ad03c5c54ed01a3ed43 to your computer and use it in GitHub Desktop.
nginx config
user www-data;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
tcp_nodelay on;
server_tokens off;
# SSL
proxy_cache_key $scheme$host$request_uri;
proxy_cache_path /var/cache/nginx/cached levels=2:2
keys_zone=global:64m inactive=60m max_size=1G;
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment