-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx_config.conf_tpl
executable file
·35 lines (29 loc) · 1.2 KB
/
nginx_config.conf_tpl
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 443 ssl;
# Insert production SSL configuration here
ssl_certificate /etc/letsencrypt/live/<project>.c3g.calculquebec.ca/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/<project>.c3g.calculquebec.ca/privkey.pem;
server_name <project>.c3g.calculquebec.ca;
server_tokens off;
location / {
try_files $uri @container;
}
location ~ ^\/api\/(?!auth) {
# Tweak these as needed for the security concerns of the instance.
add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Allow-Methods' '*' always;
add_header 'Access-Control-Allow-Headers' '*' always;
try_files $uri @container;
}
location @container {
proxy_pass http://<project>:8080;
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}