-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnginx.conf
More file actions
27 lines (23 loc) · 854 Bytes
/
nginx.conf
File metadata and controls
27 lines (23 loc) · 854 Bytes
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
server {
listen 443 ssl;
server_name api.fitfit.site;
# SSL 인증서 경로도 api.fitfit.site에 맞게 새로 발급
# (예: sudo certbot --nginx -d api.fitfit.site)
ssl_certificate /etc/letsencrypt/live/api.fitfit.site/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/api.fitfit.site/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
location / {
proxy_pass http://localhost:8080;
client_max_body_size 10m;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
server {
listen 80;
server_name api.fitfit.site;
return 301 https://$host$request_uri;
}