-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathenter.conf
59 lines (52 loc) · 1.53 KB
/
enter.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
#Load Balancing
upstream enter {
least_conn;
server 127.0.0.1:3001 weight=5 max_fails=3 fail_timeout=10s;
server 127.0.0.1:3002 weight=10 max_fails=3 fail_timeout=10s;
}
server {
listen 80 default_server;
listen [::]:80 default_server;
# SSL configuration
#
# listen 443 ssl default_server;
# listen [::]:443 ssl default_server;
#
# Note: You should disable gzip for SSL traffic.
# See: https://bugs.debian.org/773332
#
# Read up on ssl_ciphers to ensure a secure configuration.
# See: https://bugs.debian.org/765782
#
# Self signed certs generated by the ssl-cert package
# Don't use them in a production server!
#
# include snippets/snakeoil.conf;
# location / {
# return 301 https://$host$request_uri;
# }
# }
# # Add index.php to the list if you are using PHP
# index index.html index.htm index.nginx-debian.html;
# server {
# listen 443 ssl default_server;
# server_name enter.42seoul.kr;
# ssl on;
# ssl_certificate /etc/letsencrypt/live/enter.42seoul.kr/fullchain.pem;
# ssl_certificate_key /etc/letsencrypt/live/enter.42seoul.kr/privkey.pem;
# ssl_session_timeout 5m;
# ssl_protocols TLSv1.2 TLSv1.3;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
location /api/ {
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_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
proxy_pass http://enter;
proxy_redirect off;
}
}