-
Notifications
You must be signed in to change notification settings - Fork 1
/
nghttpx.conf
47 lines (44 loc) · 1.42 KB
/
nghttpx.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
# mkdir /var/log/nghttpx/
frontend=0.0.0.0,443
backend=127.0.0.1,1080
http2-proxy=yes
private-key-file=/path/to/ecc_private.key
certificate-file=/path/to/ecc_fullchain.cer
errorlog-syslog=yes
add-x-forwarded-for=no
#no-ocsp=yes
ocsp-startup=yes
no-via=yes
workers=1
backend-connections-per-host=256
tls-min-proto-version=TLSv1.2
tls-max-proto-version=TLSv1.2
fastopen=10240
ecdh-curves=X25519:P-256:P-384
npn-list=h2,http/1.1
ciphers=ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384
pid-file=/var/run/nghttpx.pid
user=nobody
accesslog-file=/var/log/nghttpx/access.log
accesslog-format=${remote_addr} [${time_local}] "${request}" ${status} ${body_bytes_sent} ${alpn} "${http_user_agent}" ${tls_cipher}
#
# vi /etc/logrotate.d/nghttpx
#
# /var/log/nghttpx/*.log {
# daily
# rotate 7
# maxage 7
# missingok
# compress
# delaycompress
# notifempty
# nomail
# create 640 nobody nogroup
# postrotate
# [ -s /var/run/nghttpx.pid ] && kill -USR1 `cat /var/run/nghttpx.pid` 2> /dev/null || true
# endscript
# }
#
# or
# echo -e "/var/log/nghttpx/*.log {\n daily\n rotate 7\n maxage 7\n missingok\n compress\n delaycompress\n notifempty\n nomail\n create 640 nobody nogroup\n postrotate\n [ -s /var/run/nghttpx.pid ] && kill -USR1 `cat /var/run/nghttpx.pid` 2> /dev/null || true\n endscript\n}" > /etc/logrotate.d/nghttpx
#