## Version 2020/03/05 - Changelog: https://github.com/linuxserver/docker-letsencrypt/commits/master/root/defaults/default
# redirect all traffic to https
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
return 301 https://$host$request_uri;
}
# main server block
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
root /config/www/hugo;
index index.html;
server_name belanyi.fr;
# all ssl related config moved to ssl.conf
include /config/nginx/ssl.conf;
client_max_body_size 0;
location / {
try_files $uri $uri/ =404;
# Matrix configuration
location /.well-known/matrix/server {
default_type application/json;
return 200 '{"m.server": "matrix.belanyi.fr:443"}';
# Debug version
listen 443 ssl;
listen [::]:443 ssl;
root /config/www/hugo-dev;
server_name dev.belanyi.fr;
# CV block
root /config/www/cv;
server_name cv.*;
# enable subdomain method reverse proxy confs
include /config/nginx/proxy-confs/*.subdomain.conf;
# enable proxy cache for auth
proxy_cache_path cache/ keys_zone=auth_cache:10m;