###########################################################
###                                                     ###
###                 MESHPI NGINX CONFIG                 ###
###                                                     ###
###########################################################

server {
    listen 80;
    server_name DOMAIN IPADDR;
    return 301 https://$host$request_uri;
}

server {
    listen 443 ssl;
    server_name DOMAIN IPADDR;

    ssl_certificate CERTPATH.crt;
    ssl_certificate_key KEYPATH.key;

    ssl_protocols TLSv1.2 TLSv1.3;
    ssl_ciphers HIGH:!aNULL:!MD5;

    ssl_session_cache shared:SSL:10m;
    ssl_session_timeout 10m;

    add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;

    location / {
        try_files $uri $uri/ =404;
        root /var/www/html;
        index index.html;
    }
}
