6
0
mirror of https://github.com/ChristianLight/tutor.git synced 2025-01-09 16:36:29 +00:00
tutor/deploy/templates/nginx/extra.conf
Régis Behmo eab812b63d Move portainer to a dedicated make command
Portainer is no longer a global activation flag, because it does not
make much sense in the context of kubernetes. Instead, we use a simpler
"make" command.
2018-12-26 19:27:08 +01:00

36 lines
935 B
Plaintext

{% if ACTIVATE_NOTES %}
{% if ACTIVATE_HTTPS %}
server {
server_name notes.{{ LMS_HOST }};
listen 80;
return 301 https://$server_name$request_uri;
}
{% endif %}
server {
listen {{ "443 ssl" if ACTIVATE_HTTPS else "80" }};
server_name notes.localhost notes.{{ LMS_HOST }};
{% if ACTIVATE_HTTPS %}
ssl_certificate /etc/letsencrypt/live/notes.{{ LMS_HOST }}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/notes.{{ LMS_HOST }}/privkey.pem;
{% endif %}
# Disables server version feedback on pages and in headers
server_tokens off;
location / {
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host;
proxy_redirect off;
# Docker resolver
resolver 127.0.0.11 valid=10s;
set $upstream notes;
proxy_pass http://$upstream:8000;
}
}
{% endif %}