Skip to content

Instantly share code, notes, and snippets.

@guptarohit
Created July 26, 2019 05:55
Show Gist options
  • Save guptarohit/a244438f6de48c42e6c830ccddc22747 to your computer and use it in GitHub Desktop.
Save guptarohit/a244438f6de48c42e6c830ccddc22747 to your computer and use it in GitHub Desktop.
worker_processes auto;
#or should be equal to the CPU core, you can use `grep processor /proc/cpuinfo | wc -l` to find; auto does it implicitly.
worker_connections 1024;
# default is 768; find optimum value for your server by `ulimit -n`
access_log off;
# to boost I/O on HDD we can disable access logs
# this prevent nginx from logging every action in a log file named `access.log`.
keepalive_timeout 15;
# default is 65;
# server will close connection after this time (in seconds)
gzip_vary on;
gzip_proxied any;
gzip_comp_level 2;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_min_length 256;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
# reduces the data that needs to be sent over the network
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment