forked from EtherDream/jsproxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
60 lines (52 loc) · 1.79 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
http {
server {
# server_name example.com;
# ssl_certificate cert/example.com/ecc.cer;
# ssl_certificate_key cert/example.com/ecc.key;
# listen 8443 ssl http2;
listen 8080;
include api.conf;
}
resolver 1.1.1.1 ipv6=off;
resolver_timeout 10s;
keepalive_timeout 60;
keepalive_requests 2048;
server_tokens off;
underscores_in_headers on;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-CHACHA20-POLY1305:ECDHE+AES128:RSA+AES128:ECDHE+AES256:RSA+AES256:ECDHE+3DES:RSA+3DES;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 5m;
ssl_prefer_server_ciphers on;
limit_req_log_level warn;
limit_req_zone $binary_remote_addr zone=reqip:16m rate=100r/s;
limit_req zone=reqip burst=200 nodelay;
# separated by tab (\t)
log_format log_proxy escape=none
'$time_iso8601 $_origin_id $_ver $remote_addr '
'$upstream_cache_status $request_time '
'$request_length $bytes_sent '
'$request_method $_url $status $upstream_http_access_control_allow_origin '
'$http_user_agent'
;
access_log logs/proxy.log log_proxy buffer=64k flush=1s;
proxy_cache_path cache
levels=1:2
keys_zone=my_cache:8m
max_size=10g
inactive=6h
use_temp_path=off
;
proxy_http_version 1.1;
proxy_ssl_server_name on;
proxy_buffer_size 16k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_send_timeout 10s;
map $http_origin $_origin_id {
include allowed-sites.txt;
}
}
events {
worker_connections 4096;
}