mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-12-12 22:27:47 +00:00
33 lines
990 B
Plaintext
33 lines
990 B
Plaintext
server {
|
|
listen 80;
|
|
server_name {{ NOTES_HOST }};
|
|
|
|
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;
|
|
proxy_pass http://localhost:{{ NGINX_HTTP_PORT }};
|
|
}
|
|
}
|
|
{% if ACTIVATE_HTTPS %}
|
|
server {
|
|
listen 443 ssl;
|
|
server_name {{ NOTES_HOST }};
|
|
|
|
ssl_certificate /etc/letsencrypt/live/{{ NOTES_HOST }}/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/{{ NOTES_HOST }}/privkey.pem;
|
|
|
|
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;
|
|
proxy_pass http://localhost:{{ NGINX_HTTPS_PORT }};
|
|
}
|
|
}
|
|
{% endif %} |