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 context: ./services/nginx
ports: ports:
- 80:80 - 80:80
- 443:443
links: [] links: []

View File

@ -13,7 +13,16 @@ http {
include /etc/nginx/mime.types; include /etc/nginx/mime.types;
server { server {
listen {{port}}; 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}}; server_name {{host}};
autoindex off; autoindex off;