view nginx.ssl.conf.luan @ 17:3e8c7d089e30 default tip

URL update
author Vadim Filimonov <fffilimonov@yandex.ru>
date Mon, 02 Oct 2023 12:23:02 +0300
parents dfc36e7ed22c
children
line wrap: on
line source

local rootDir, domain = ...

%>
    server {
        server_name <%=domain%>;
        listen 80;
        return 301 https://$http_host$request_uri;
    }

    server {
        server_name <%=domain%>;
        listen 443 ssl;

        if ($host != $server_name) {
            return 301 http://$http_host$request_uri;
        }

        ssl_certificate <%=rootDir%>/local/ssl/<%=domain%>/fullchain.cer;
        ssl_certificate_key <%=rootDir%>/local/ssl/<%=domain%>/<%=domain%>.key;
        include <%=rootDir%>/nginx.default.conf;
        include <%=rootDir%>/config/nginx.custom.*.conf;
        include <%=rootDir%>/config/nginx.conf;
    }
<%