| 1 | user www-data;
|
|---|
| 2 | worker_processes 4;
|
|---|
| 3 | pid /run/nginx.pid;
|
|---|
| 4 |
|
|---|
| 5 | include /etc/nginx/modules-enabled/*.conf;
|
|---|
| 6 |
|
|---|
| 7 | events {
|
|---|
| 8 | worker_connections 4096;
|
|---|
| 9 | use epoll;
|
|---|
| 10 | multi_accept on;
|
|---|
| 11 | }
|
|---|
| 12 |
|
|---|
| 13 | http {
|
|---|
| 14 | # General
|
|---|
| 15 | sendfile on;
|
|---|
| 16 | tcp_nopush on;
|
|---|
| 17 | tcp_nodelay on;
|
|---|
| 18 |
|
|---|
| 19 | client_body_timeout 15s;
|
|---|
| 20 | client_header_timeout 15s;
|
|---|
| 21 | keepalive_timeout 75s;
|
|---|
| 22 | send_timeout 15s;
|
|---|
| 23 |
|
|---|
| 24 | types_hash_max_size 2048;
|
|---|
| 25 |
|
|---|
| 26 | server_names_hash_max_size 2048;
|
|---|
| 27 | server_names_hash_bucket_size 128;
|
|---|
| 28 |
|
|---|
| 29 | proxy_buffer_size 16k;
|
|---|
| 30 | proxy_buffers 8 16k;
|
|---|
| 31 | proxy_busy_buffers_size 16k;
|
|---|
| 32 |
|
|---|
| 33 | client_body_buffer_size 16k;
|
|---|
| 34 | client_header_buffer_size 1k;
|
|---|
| 35 | client_max_body_size 8m;
|
|---|
| 36 | large_client_header_buffers 4 8k;
|
|---|
| 37 |
|
|---|
| 38 | include /etc/nginx/mime.types;
|
|---|
| 39 | default_type application/octet-stream;
|
|---|
| 40 |
|
|---|
| 41 | # Security
|
|---|
| 42 | server_tokens off;
|
|---|
| 43 |
|
|---|
| 44 | more_set_headers "X-Frame-Options: SAMEORIGIN";
|
|---|
| 45 | more_set_headers "X-Content-Type-Options: nosniff";
|
|---|
| 46 | more_set_headers "X-XSS-Protection: 1; mode=block";
|
|---|
| 47 |
|
|---|
| 48 | ssl_protocols TLSv1.2 TLSv1.3;
|
|---|
| 49 | ssl_ecdh_curve X25519:secp384r1;
|
|---|
| 50 | ssl_ciphers ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256;
|
|---|
| 51 | ssl_prefer_server_ciphers on;
|
|---|
| 52 |
|
|---|
| 53 | ssl_session_cache shared:SSL:10m;
|
|---|
| 54 | ssl_session_timeout 10m;
|
|---|
| 55 | ssl_session_tickets off;
|
|---|
| 56 |
|
|---|
| 57 | ssl_stapling on;
|
|---|
| 58 | ssl_stapling_verify on;
|
|---|
| 59 | resolver 10.20.61.1;
|
|---|
| 60 |
|
|---|
| 61 | # Gzip
|
|---|
| 62 | gzip on;
|
|---|
| 63 | gzip_comp_level 4;
|
|---|
| 64 | gzip_min_length 1000;
|
|---|
| 65 | gzip_types text/plain text/css text/javascript application/javascript application/json image/svg+xml;
|
|---|
| 66 | gzip_vary on;
|
|---|
| 67 |
|
|---|
| 68 | # Logging
|
|---|
| 69 | log_format main '$remote_addr ($http_x_forwarded_for) - $remote_user [$time_local] '
|
|---|
| 70 | '"$request" $status $body_bytes_sent '
|
|---|
| 71 | '"$http_referer" "$http_user_agent"';
|
|---|
| 72 |
|
|---|
| 73 | access_log /var/log/nginx/access.log main;
|
|---|
| 74 | error_log /var/log/nginx/error.log;
|
|---|
| 75 |
|
|---|
| 76 | # Virtual Hosts
|
|---|
| 77 | include /etc/nginx/sites-enabled/*;
|
|---|
| 78 | }
|
|---|