-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.conf
81 lines (61 loc) · 1.98 KB
/
default.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
80
81
upstream barrenchat-api {
server barrenschat-api-1:9000;
server barrenschat-api-2:9000;
}
# server {
# #gzip on;
# #gzip_types text/plain application/xml;
# #gzip_proxied no-cache no-store private expired auth;
# #gzip_min_length 1000;
# listen 8081 ;
# # ssl_certificate /etc/nginx/fullchain.pem;
# # ssl_certificate_key /etc/nginx/privkey.pem;
# # ssl_protocols TLSv1.2;
# }
server {
server_name engineerbeard.com;
listen 80;
listen [::]:80;
return 301 https://$host$request_uri;
}
# TODO
# We need generate a stronger DHE parameter:
# cd /etc/ssl/certs
# openssl dhparam -out dhparam.pem 4096
# And then tell nginx to use it for DHE key-exchange:
# ssl_dhparam /etc/ssl/certs/dhparam.pem;
server {
server_name engineerbeard.com;
listen 443 ssl http2;
listen [::]:443 ssl http2;
ssl_ciphers 'AES256+EECDH';
#ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
ssl_certificate /etc/nginx/fullchain.pem;
ssl_certificate_key /etc/nginx/privkey.pem;
ssl_protocols TLSv1.2;
gzip on;
gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/xml application/json application/javascript;
gzip_proxied any;
gzip_comp_level 9;
#gzip_min_length 1000;
root /usr/share/nginx/html;
deny 169.229.3.91;
deny 5.188.9.80;
location = / {
index index.html;
}
location = /version {
proxy_pass http://barrenchat-api/version;
}
location = /bchatws {
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header Host $http_host;
# proxy_set_header X-NginX-Proxy true;
proxy_pass http://barrenchat-api/;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}