2021-12-07 13:26:24 +00:00
|
|
|
upstream reftest {
|
|
|
|
server ref_test_app:5000;
|
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
2022-06-16 13:21:27 +01:00
|
|
|
|
|
|
|
listen 80 default_server;
|
|
|
|
listen [::]:80 default_server;
|
2021-12-07 13:26:24 +00:00
|
|
|
# Redirect to ssl
|
2022-04-17 18:42:40 +01:00
|
|
|
return 301 https://$host$request_uri;
|
2021-12-07 13:26:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
2022-06-16 13:21:27 +01:00
|
|
|
|
|
|
|
listen 443 ssl http2 default_server;
|
|
|
|
listen [::]:443 ssl http2 default_server;
|
2021-12-07 13:26:24 +00:00
|
|
|
|
|
|
|
#SSL configuration
|
2022-04-17 18:42:40 +01:00
|
|
|
include /etc/nginx/ssl.conf;
|
|
|
|
include /etc/nginx/certbot-challenge.conf;
|
2021-12-07 13:26:24 +00:00
|
|
|
|
2022-06-16 12:52:55 +01:00
|
|
|
location ^~ /quiz/static/ {
|
2021-12-07 13:26:24 +00:00
|
|
|
include /etc/nginx/mime.types;
|
|
|
|
alias /usr/share/nginx/html/quiz/static/;
|
|
|
|
}
|
|
|
|
|
|
|
|
location ^~ /admin/static/ {
|
|
|
|
include /etc/nginx/mime.types;
|
|
|
|
alias /usr/share/nginx/html/admin/static/;
|
|
|
|
}
|
|
|
|
|
|
|
|
location / {
|
|
|
|
include /etc/nginx/conf.d/common-location.conf;
|
|
|
|
proxy_pass http://reftest;
|
|
|
|
}
|
|
|
|
}
|