Commit 72e87027 authored by Valentin Samir's avatar Valentin Samir

[proxy,bakdaur,frontdaur] Ajoute l'alias vers /.well-known/acme-challenge

a la configuration généré pour les proxy https
parent 0a219af0
......@@ -71,7 +71,15 @@ site_template = """server {
server_name %(serveur)s;
include "snippets/proxy-common.conf";
return 302 https://$host$request_uri;
location / {
return 302 https://$host$request_uri;
}
# On redirige tout ce qui concerne le challenge letsencrypt vers le meme dossier
# pour pouvoir utiliser le plugin webroot de letsencrypt
location /.well-known/acme-challenge {
alias /usr/share/nginx/html/.well-known/acme-challenge;
}
}
server {
......@@ -90,6 +98,12 @@ server {
proxy_set_header X-Forwarded-For $remote_addr;
}
# On redirige tout ce qui concerne le challenge letsencrypt vers le meme dossier
# pour pouvoir utiliser le plugin webroot de letsencrypt
location /.well-known/acme-challenge {
alias /usr/share/nginx/html/.well-known/acme-challenge;
}
}
"""
......@@ -97,7 +111,15 @@ site_redirect_template = """server {
server_name %(serveur)s;
include "snippets/proxy-common.conf";
return 302 %(redirect)s$request_uri;
# On redirige tout ce qui concerne le challenge letsencrypt vers le meme dossier
# pour pouvoir utiliser le plugin webroot de letsencrypt
location /.well-known/acme-challenge {
alias /usr/share/nginx/html/.well-known/acme-challenge;
}
location / {
return 302 %(redirect)s$request_uri;
}
}
server {
......@@ -108,6 +130,14 @@ server {
ssl_certificate_key /etc/letsencrypt/live/%(cert_name)s/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/%(cert_name)s/chain.pem;
return 302 %(redirect)s$request_uri;
# On redirige tout ce qui concerne le challenge letsencrypt vers le meme dossier
# pour pouvoir utiliser le plugin webroot de letsencrypt
location /.well-known/acme-challenge {
alias /usr/share/nginx/html/.well-known/acme-challenge;
}
location / {
return 302 %(redirect)s$request_uri;
}
}
"""
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment