-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
46 lines (40 loc) · 1.83 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
server {
server_name api.flashplay.app;
listen [::]:443 ssl; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/my.flashplay.app/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/my.flashplay.app/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
location / {
# if ($request_method = OPTIONS) {
# return 204;
# }
# add_header 'Access-Control-Allow-Origin' "$http_origin" always;
# add_header 'Access-Control-Allow-Methods' 'POST,GET,PUT,DELETE,OPTIONS' always;
# add_header 'Access-Control-Max-Age' 3600;
# add_header 'Access-Control-Allow-Credentials' 'true' always;
# add_header 'Access-Control-Expose-Headers' 'Authorization,Content-Length';
# add_header 'Access-Control-Allow-Headers' 'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With,append,de$
#add_header Access-Control-Allow-Headers Authorization;
# add_header Host $host;
# proxy_pass_request_headers on;
# proxy_pass_header Authorization;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_pass http://localhost:3002;
client_max_body_size 100M;
}
access_log /var/log/nginx/api.flashplay.app.log;
error_log /var/log/nginx/api.flashplay.app.error.log;
}
server {
if ($host = api.flashplay.app) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
listen [::]:80;
server_name api.flashplay.app;
return 404; # managed by Certbot
}