diff --git a/Lets_Encrypt.sh b/Lets_Encrypt.sh deleted file mode 100755 index a892087..0000000 --- a/Lets_Encrypt.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -sudo docker run -it --rm --name certbot \ - -v `pwd`/etc/letsencrypt/certs:/opt/bitnami/nginx/conf/bitnami/certs \ - deliverous/certbot \ - certonly \ - --webroot --webroot-path=/data/letsencrypt \ - -d localhost -d www.localhost --staging diff --git a/docker-compose.yml b/docker-compose.yml index ec7c94c..baa8f61 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,15 +8,13 @@ services: - "./etc/nginx:/opt/bitnami/nginx/conf/vhosts" - "./Website:/opt/bitnami/nginx/html" - "./etc/logs/nginx:/opt/bitnami/nginx/logs" - - "./etc/letsencrypt/certs:/opt/bitnami/nginx/conf/bitnami/certs" + - "./etc/letsencrypt:/etc/letsencrypt" # - "./etc/nginx/fastcgi.conf:/bitnami/nginx/conf/fastcgi.conf" ports: - "80:8080" - "443:443" environment: - NGINX_HOST=${NGINX_HOST} -# - LETSENCRYPT_HOST=localhost -# - LETSENCRYPT_EMAIL=root@root.com restart: always myadmin: diff --git a/etc/nginx/HTTPS_default.conf.BAK b/etc/nginx/HTTPS_default.conf.BAK index 6d1dbf9..29b9a1f 100755 --- a/etc/nginx/HTTPS_default.conf.BAK +++ b/etc/nginx/HTTPS_default.conf.BAK @@ -47,7 +47,7 @@ server { client_max_body_size 100M; location / { - try_files $uri $uri/ =404; + root /opt/bitnami/nginx/html; } ####### Proxies ####### @@ -81,7 +81,7 @@ server { proxy_pass http://tomcat; } - location ~ /.well-known { + location ~ /\.well-known/acme-challenge { root /opt/bitnami/nginx/html; allow all; } diff --git a/etc/nginx/nginx.conf b/etc/nginx/nginx.conf index 6b07395..3b52dc3 100755 --- a/etc/nginx/nginx.conf +++ b/etc/nginx/nginx.conf @@ -21,7 +21,7 @@ server { client_max_body_size 100M; location / { - try_files $uri $uri/ =404; + root /opt/bitnami/nginx/html; } ####### Proxies #######