This commit is contained in:
Marwolf
2018-08-18 17:35:15 -04:00
parent 82bc1016d5
commit 23f6432dd7
5 changed files with 8 additions and 106 deletions

View File

@@ -15,9 +15,8 @@ server {
error_log /opt/bitnami/nginx/logs/error.log;
access_log /opt/bitnami/nginx/logs/access.log;
location '/.well-known/acme-challenge' {
default_type "text/plain";
proxy_pass http://certbot_upstream;
location / {
root /opt/bitnami/nginx/html;
}
rewrite ^ https://$http_host$request_uri? permanent; #Redirect traffic to HTTPS

View File

@@ -6,10 +6,6 @@ upstream ghost {
server ghost:2368;
}
upstream certbot_upstream{
server certbot:80;
}
# HTTP
server {
listen 8080 default_server;
@@ -25,12 +21,7 @@ server {
client_max_body_size 100M;
location / {
root /opt/bitnami/nginx/html;
}
location '/.well-known/acme-challenge' {
default_type "text/plain";
proxy_pass http://certbot_upstream;
try_files $uri $uri/ =404;
}
####### Proxies #######
@@ -64,4 +55,9 @@ server {
proxy_pass http://tomcat;
}
location ~ /\.well-known/acme-challenge {
root /opt/bitnami/nginx/html;
allow all;
}
}