-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
49 lines (41 loc) · 1.19 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
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 80;
server_name moneyisinvest.kr www.moneyisinvest.kr;
# HTTP 요청을 HTTPS로 리다이렉트
return 301 https://$host$request_uri;
}
server {
server_name moneyisinvest.kr www.moneyisinvest.kr;
# SSL 수정
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/moneyisinvest.kr/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/moneyisinvest.kr/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html =404;
}
location /api {
proxy_pass http://backend:8080;
}
location /stockRank {
proxy_pass http://backend:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Host $http_host;
}
location /stock {
proxy_pass http://backend:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Host $http_host;
}
}