40 lines
887 B
Plaintext
40 lines
887 B
Plaintext
|
server {
|
||
|
listen 80;
|
||
|
server_name __DOMAIN__;
|
||
|
|
||
|
#Ajout pour les certificats letsencrypt
|
||
|
include snippets/acme-challenge.conf;
|
||
|
|
||
|
return 301 https://$http_host$request_uri;
|
||
|
|
||
|
root /html/$DOMAIN;
|
||
|
|
||
|
}
|
||
|
|
||
|
server {
|
||
|
listen 443 ssl http2;
|
||
|
server_name __DOMAIN__;
|
||
|
|
||
|
|
||
|
ssl_certificate /etc/ssl/__DOMAIN__.crt;
|
||
|
ssl_certificate_key /etc/ssl/private/__DOMAIN__.key;
|
||
|
|
||
|
#Ajout d'une configuration ssl securise
|
||
|
include snippets/secure-ssl.conf;
|
||
|
|
||
|
# Speeds things up a little bit when resuming a session
|
||
|
# ssl_session_timeout 5m;
|
||
|
# ssl_session_cache shared:SSL:5m;
|
||
|
|
||
|
# Ajout pour le certificat letsencrypt
|
||
|
include snippets/acme-challenge.conf;
|
||
|
|
||
|
# Ajout pour securiser les headers
|
||
|
include snippets/secure-headers.conf;
|
||
|
}
|
||
|
|
||
|
# Path to the root of your installation
|
||
|
root /html/$DOMAIN;
|
||
|
|
||
|
}
|