You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
1.6 KiB
56 lines
1.6 KiB
7 years ago
|
server {
|
||
|
listen 80;
|
||
|
server_name {{ hostname_riot }};
|
||
|
|
||
|
server_tokens off;
|
||
|
|
||
|
location /.well-known/acme-challenge {
|
||
6 years ago
|
{% if matrix_nginx_proxy_enabled %}
|
||
|
{# Use the embedded DNS resolver in Docker containers to discover the service #}
|
||
|
resolver 127.0.0.11 valid=5s;
|
||
|
set $backend "matrix-certbot:80";
|
||
|
proxy_pass http://$backend;
|
||
|
{% else %}
|
||
|
{# Generic configuration for use outside of our container setup #}
|
||
6 years ago
|
proxy_pass http://localhost:{{ matrix_ssl_lets_encrypt_certbot_standalone_http_port }};
|
||
7 years ago
|
{% endif %}
|
||
7 years ago
|
}
|
||
|
|
||
|
location / {
|
||
|
return 301 https://$http_host$request_uri;
|
||
|
}
|
||
|
}
|
||
|
|
||
7 years ago
|
server {
|
||
|
listen 443 ssl http2;
|
||
|
listen [::]:443 ssl http2;
|
||
|
|
||
|
server_name {{ hostname_riot }};
|
||
|
|
||
|
server_tokens off;
|
||
|
root /dev/null;
|
||
|
|
||
6 years ago
|
gzip on;
|
||
6 years ago
|
gzip_types text/plain application/json application/javascript text/css image/x-icon font/ttf image/gif;
|
||
6 years ago
|
|
||
6 years ago
|
ssl_certificate {{ matrix_ssl_config_dir_path }}/live/{{ hostname_riot }}/fullchain.pem;
|
||
|
ssl_certificate_key {{ matrix_ssl_config_dir_path }}/live/{{ hostname_riot }}/privkey.pem;
|
||
6 years ago
|
ssl_protocols {{ matrix_nginx_proxy_ssl_protocols }};
|
||
7 years ago
|
ssl_prefer_server_ciphers on;
|
||
|
ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
|
||
|
|
||
|
location / {
|
||
6 years ago
|
{% if matrix_nginx_proxy_enabled %}
|
||
|
{# Use the embedded DNS resolver in Docker containers to discover the service #}
|
||
|
resolver 127.0.0.11 valid=5s;
|
||
6 years ago
|
set $backend "matrix-riot-web:80";
|
||
6 years ago
|
proxy_pass http://$backend;
|
||
|
{% else %}
|
||
6 years ago
|
{# Generic configuration for use outside of our container setup #}
|
||
6 years ago
|
proxy_pass http://localhost:8765;
|
||
|
{% endif %}
|
||
|
|
||
7 years ago
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||
|
}
|
||
7 years ago
|
}
|