-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
82 lines (70 loc) · 1.88 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
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
82
# events {
# worker_connections 1024;
# }
# http {
# server {
# listen 80;
# location /fds/ {
# proxy_pass http://fds:8000;
# }
# location /atsvp/ {
# proxy_pass http://atsvp:8000;
# }
# location /apsvp/ {
# proxy_pass http://apsvp:8000;
# }
# }
# }
events {}
http {
server {
listen 80;
server_name fds.atri.org.tw;
location / {
#proxy_pass http://app2;
return 301 https://$host$request_uri;
}
location /.well-known/pki-validation/ {
alias /.well-known/pki-validation/;
}
}
}
stream {
server{
listen 443 ssl;
# ssl on;
ssl_certificate /etc/ssl/certificate.crt;
ssl_certificate_key /etc/ssl/private.key;
server_name fds.atri.org.tw;
access_log /var/log/nginx/nginx.vhost.access.log;
error_log /var/log/nginx/nginx.vhost.error.log;
location / {
proxy_pass http://fds:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
location /static/ {
include /etc/nginx/mime.types;
default_type application/octet-stream;
autoindex on;
alias /app/live-static-files/statics/;
add_header Cache-Control "public, max-age=604800";
}
}
}
# server {
# listen 80;
# server_name apsvp.com;
# location / {
# proxy_pass http://apsvp:8002;
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# }
# location /static/ {
# include /etc/nginx/mime.types;
# default_type application/octet-stream;
# autoindex on;
# alias /app/live-static-files/static-root/;
# add_header Cache-Control "public, max-age=604800";
# }
# }