diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f08585a --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +certs/ssl/bundle.crt +certs/ssl/private.key \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 01bad77..784c866 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,2 +1,4 @@ FROM nginx COPY nginx.conf /etc/nginx/nginx.conf +COPY certs/ssl/bundle.crt /etc/nginx/certs/ssl/bundle.crt +COPY certs/ssl/private.key /etc/nginx/certs/ssl/private.key \ No newline at end of file diff --git a/certs/ssl/tempate.private.key b/certs/ssl/tempate.private.key new file mode 100644 index 0000000..e69de29 diff --git a/certs/ssl/template.bundle.crt b/certs/ssl/template.bundle.crt new file mode 100644 index 0000000..e69de29 diff --git a/nginx.conf b/nginx.conf index 5fedfe4..18b86f1 100644 --- a/nginx.conf +++ b/nginx.conf @@ -1,8 +1,17 @@ events {} http { server { - listen 80 default backlog=16384; - listen [::]:80 default backlog=16384; + listen 80; + listen [::]:80; + listen 443 ssl default_server backlog=16384; + listen [::]:443 ssl default_server backlog=16384; + + ssl_certificate certs/ssl/bundle.crt; + ssl_certificate_key certs/ssl/private.key; + + if ($scheme = http) { + return 301 https://$server_name$request_uri; + } location /lib.min.js { proxy_set_header X-Real-IP $http_x_forwarded_for;