6
0
mirror of https://github.com/ChristianLight/tutor.git synced 2025-01-06 07:30:40 +00:00

Enable HTTPS supports for CMS_HOST

This commit is contained in:
flytreeleft 2018-09-02 12:35:59 +08:00 committed by Régis Behmo
parent 21608386de
commit 7989ee88d9
2 changed files with 16 additions and 3 deletions

View File

@ -1,7 +1,20 @@
{% if ACTIVATE_HTTPS %}
server {
listen 80;
server_name {{ CMS_HOST }};
listen 80;
return 301 https://$server_name$request_uri;
}
{% endif %}
server {
listen {{ "443 ssl" if ACTIVATE_HTTPS else "80" }};
server_name studio.localhost {{ CMS_HOST }};
{% if ACTIVATE_HTTPS %}
ssl_certificate /etc/letsencrypt/live/{{ LMS_HOST }}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/{{ LMS_HOST }}/privkey.pem;
{% endif %}
# Prevent invalid display courseware in IE 10+ with high privacy settings
add_header P3P 'CP="Open edX does not have a P3P policy."';

View File

@ -14,7 +14,7 @@ server {
ssl_certificate /etc/letsencrypt/live/{{ LMS_HOST }}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/{{ LMS_HOST }}/privkey.pem;
{% endif %}
# Prevent invalid display courseware in IE 10+ with high privacy settings
add_header P3P 'CP="Open edX does not have a P3P policy."';