Another attempt

This commit is contained in:
Marwolf
2018-08-18 16:52:28 -04:00
parent 4e7f767498
commit 82bc1016d5
5 changed files with 112 additions and 10 deletions

View File

@@ -15,6 +15,11 @@ 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;
}
rewrite ^ https://$http_host$request_uri? permanent; #Redirect traffic to HTTPS
}
@@ -50,6 +55,11 @@ server {
root /opt/bitnami/nginx/html;
}
location '/.well-known/acme-challenge' {
default_type "text/plain";
proxy_pass http://certbot_upstream;
}
####### Proxies #######
# PHP proxy
# location /board {
@@ -81,9 +91,4 @@ server {
proxy_pass http://tomcat;
}
location ~ /\.well-known/acme-challenge {
root /opt/bitnami/nginx/html;
allow all;
}
}

View File

@@ -6,6 +6,10 @@ upstream ghost {
server ghost:2368;
}
upstream certbot_upstream{
server certbot:80;
}
# HTTP
server {
listen 8080 default_server;
@@ -24,6 +28,11 @@ server {
root /opt/bitnami/nginx/html;
}
location '/.well-known/acme-challenge' {
default_type "text/plain";
proxy_pass http://certbot_upstream;
}
####### Proxies #######
# PHP proxy
# location /board {
@@ -55,9 +64,4 @@ server {
proxy_pass http://tomcat;
}
location ~ /\.well-known/acme-challenge {
root /opt/bitnami/nginx/html;
allow all;
}
}