Nginx directives

From wikieduonline
(Redirected from Nginx directive)
Jump to navigation Jump to search
listen 443 ssl;
listen 80;
  • server_tokens off; (Context: http, server, location) [4]


Proxy (Nginx can proxy requests using http, FastCGI, uwsgi, SCGI, or memcached.)

  • proxy_read_timeout 2400s;
  • proxy_connect_timeout 75s;
  • proxy_send_timeout 2400s;
  • proxy_buffer_size 32k;
  • proxy_buffers 40 32k;
  • proxy_busy_buffers_size 64k;
  • proxy_temp_file_write_size 250m;
  • proxy_http_version 1.1;
  • proxy_redirect [default|off|redirect replacement][5]


SSL (See also: certbot)

ssl_certificate /etc/nginx/ssl/example.pem;
ssl_certificate_key /etc/nginx/ssl/example.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers on; server ciphers should be preferred over client ciphers when using the SSLv3 and TLS protocols[6]

ssl_certificate /etc/letsencrypt/live/;
ssl_certificate_key /etc/letsencrypt/live/;

See also[edit]

  • Advertising: