{% if ACTIVATE_HTTPS %} ServerName {{ NOTES_HOST }} Redirect / https://notes.{{ LMS_HOST }}/ ServerName {{ NOTES_HOST }} SSLEngine on SSLCertificateFile /etc/letsencrypt/live/{{ NOTES_HOST }}/fullchain.pem SSLCertificateKeyFile /etc/letsencrypt/live/{{ NOTES_HOST }}/privkey.pem ProxyPreserveHost On ProxyRequests On ProxyPass / http://localhost:{{ NGINX_HTTP_PORT }}/ ProxyPassReverse / http://localhost:{{ NGINX_HTTP_PORT }}/ {% else %} ServerName {{ NOTES_HOST }} ProxyPreserveHost On ProxyRequests On ProxyPass / http://localhost:{{ NGINX_HTTP_PORT }}/ ProxyPassReverse / http://localhost:{{ NGINX_HTTP_PORT }}/ {% endif %}