From 79eb7849d2cc9fef29abd5b2e8f766b9de485198 Mon Sep 17 00:00:00 2001 From: tangoyankee Date: Mon, 3 Jul 2023 18:12:23 -0400 Subject: [PATCH 1/2] certbot challenge failes --- compose.yaml | 7 +++++++ nginx/Dockerfile | 9 +++++++++ nginx/default.conf | 21 +++++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 compose.yaml create mode 100644 nginx/Dockerfile create mode 100644 nginx/default.conf diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..7aa34fe --- /dev/null +++ b/compose.yaml @@ -0,0 +1,7 @@ +services: + nginx: + build: ./nginx + ports: + - 80:80 + volumes: + - ./nginx/letsencrpt:/etc/letsencrpt diff --git a/nginx/Dockerfile b/nginx/Dockerfile new file mode 100644 index 0000000..4bbe406 --- /dev/null +++ b/nginx/Dockerfile @@ -0,0 +1,9 @@ +FROM nginx:1.25.1-alpine3.17-slim + +RUN apk add certbot certbot-nginx + +RUN rm /etc/nginx/conf.d/default.conf + +COPY default.conf /etc/nginx/conf.d/default.conf + +EXPOSE 80 443 diff --git a/nginx/default.conf b/nginx/default.conf new file mode 100644 index 0000000..f17440c --- /dev/null +++ b/nginx/default.conf @@ -0,0 +1,21 @@ +server { + listen 80; + listen [::]:80; + server_name local.tangoyankee.io; + + #access_log /var/log/nginx/host.access.log main; + + location / { + root /usr/share/nginx/html; + index index.html index.htm; + } + + #error_page 404 /404.html; + + # redirect server error pages to the static page /50x.html + # + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } +} From b3762861177bd5a97d1bf50e07514cd56138c9dc Mon Sep 17 00:00:00 2001 From: tangoyankee Date: Mon, 3 Jul 2023 23:48:07 +0000 Subject: [PATCH 2/2] first certification --- .gitignore | 3 +++ compose.yaml | 3 ++- nginx/default.conf | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index c6bba59..b6febc3 100644 --- a/.gitignore +++ b/.gitignore @@ -128,3 +128,6 @@ dist .yarn/build-state.yml .yarn/install-state.gz .pnp.* + +# letsencrpyt certification +letsencrypt/ diff --git a/compose.yaml b/compose.yaml index 7aa34fe..182fa58 100644 --- a/compose.yaml +++ b/compose.yaml @@ -3,5 +3,6 @@ services: build: ./nginx ports: - 80:80 + - 443:443 volumes: - - ./nginx/letsencrpt:/etc/letsencrpt + - ./nginx/letsencrypt/:/etc/letsencrypt/ diff --git a/nginx/default.conf b/nginx/default.conf index f17440c..83378f8 100644 --- a/nginx/default.conf +++ b/nginx/default.conf @@ -1,7 +1,7 @@ server { listen 80; listen [::]:80; - server_name local.tangoyankee.io; + server_name test.tangoyankee.io; #access_log /var/log/nginx/host.access.log main;