-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathnginx.conf
79 lines (61 loc) · 1.56 KB
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# Baseline Nginx configuration
##
# Resources
# https://github.com/h5bp/server-configs-nginx
# https://github.com/A5hleyRich/wordpress-nginx
# https://serversforhackers.com/
##
user www-data; # consider changing to your user on a single-user server
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
worker_rlimit_nofile 8192;
##
# Error logs
# in progress!
# error_log logs/error.log warn;
##
events {
worker_connections 8000;
multi_accept on;
use epoll;
}
http {
##
# Rate limiting
# in progress!
# limit_req_zone $binary_remote_addr zone=main:10m rate=60r/m;
##
# Performance
sendfile on;
tcp_nopush on;
tcp_nodelay on;
# TODO
types_hash_max_size 2048;
server_names_hash_max_size 1024;
server_names_hash_bucket_size 1024;
# Security
server_tokens off;
# File types
include /etc/nginx/mime.types;
default_type application/octet-stream;
# Timeout
keepalive_timeout 20; # seconds - default 60
client_body_timeout 60;
client_header_timeout 60;
send_timeout 60;
# Buffering
client_body_buffer_size 100K;
client_header_buffer_size 1k;
large_client_header_buffers 4 8k; # default
# Upload sizes
client_max_body_size 32m; # raise for phpMyAdmin database uploads
# Gzip
include /etc/nginx/global/http/gzip.conf;
# FastCGI cache
include /etc/nginx/global/http/cache-path.conf;
# Use .webp - must be used with /server/webp-expires.conf to activate
# include /etc/nginx/global/http/check-webp.conf;
# Get server blocks
include /etc/nginx/conf.d/*.conf;
}