Commit bc38085d authored by Valentin Samir's avatar Valentin Samir Committed by Hamza Dely
Browse files

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

a la configuration généré pour les proxy https
parent c134bf0f
...@@ -71,7 +71,15 @@ site_template = """server { ...@@ -71,7 +71,15 @@ site_template = """server {
server_name %(serveur)s; server_name %(serveur)s;
include "snippets/proxy-common.conf"; 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 { server {
...@@ -90,6 +98,12 @@ server { ...@@ -90,6 +98,12 @@ server {
proxy_set_header X-Forwarded-For $remote_addr; 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 { ...@@ -97,7 +111,15 @@ site_redirect_template = """server {
server_name %(serveur)s; server_name %(serveur)s;
include "snippets/proxy-common.conf"; 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 { server {
...@@ -108,6 +130,14 @@ server { ...@@ -108,6 +130,14 @@ server {
ssl_certificate_key /etc/letsencrypt/live/%(cert_name)s/privkey.pem; ssl_certificate_key /etc/letsencrypt/live/%(cert_name)s/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/%(cert_name)s/chain.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;
}
} }
""" """
Supports Markdown
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