-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnginx.conf
More file actions
35 lines (28 loc) · 893 Bytes
/
nginx.conf
File metadata and controls
35 lines (28 loc) · 893 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
28
29
30
31
32
33
34
35
server {
listen 80;
server_name healthtant.com www.healthtant.com;
# HTTP 접근 시 HTTPS로 리다이렉트
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name healthtant.com www.healthtant.com;
ssl_certificate /etc/letsencrypt/live/healthtant.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/healthtant.com/privkey.pem;
charset utf-8;
client_max_body_size 10M;
location /static/ {
alias /app/staticfiles/;
}
location /media/ {
alias /app/media/;
}
location / {
proxy_pass http://web:8000;
proxy_set_header Host $http_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 https;
proxy_set_header X-Forwarded-Host $server_name;
}
}