nginx SSL

This commit is contained in:
Juan 2018-06-12 14:38:27 +02:00
parent e053515997
commit cde2458404
2 changed files with 13 additions and 3 deletions

View File

@ -6,4 +6,5 @@ services:
context: ./services/nginx
ports:
- 80:80
- 443:443
links: []

View File

@ -13,9 +13,18 @@ http {
include /etc/nginx/mime.types;
server {
listen {{port}};
server_name {{host}};
autoindex off;
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
ssl_certificate /config/nginx/cert.pem;
ssl_certificate_key /config/nginx/key.pem;
server_name {{host}};
autoindex off;
root /usr/share/nginx/html;