6
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-12-14 06:58:21 +00:00
tutor/plugins/notes/tutornotes/patches/proxy-apache

28 lines
792 B
Plaintext
Raw Normal View History

2019-07-03 14:09:33 +00:00
{% if ACTIVATE_HTTPS %}
<VirtualHost *:80>
ServerName {{ NOTES_HOST }}
Redirect / https://notes.{{ LMS_HOST }}/
</VirtualHost>
<VirtualHost *:443>
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 }}/
</VirtualHost>
{% else %}
<VirtualHost *:80>
ServerName {{ NOTES_HOST }}
ProxyPreserveHost On
ProxyRequests On
ProxyPass / http://localhost:{{ NGINX_HTTP_PORT }}/
ProxyPassReverse / http://localhost:{{ NGINX_HTTP_PORT }}/
</VirtualHost>
{% endif %}