From 2ade911283e8d536030a6852e53c95cc0e1a58cd Mon Sep 17 00:00:00 2001 From: Ava Hahn Date: Wed, 24 Sep 2025 23:22:53 +0000 Subject: [PATCH] initial Signed-off-by: Ava Hahn --- nginx.conf | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 nginx.conf diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..4ad0b39 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,43 @@ +worker_processes 1; +error_log /dev/stdout notice; +pid /tmp/pid; +daemon off; + +http { + resolver 8.8.8.8:53; + + acme_issuer acme_staging { + uri https://acme-staging-v02.api.letsencrypt.org/directory; + contact ava@sunnypup.io; + state_path /tmp; + accept_terms_of_service; + } + + acme_shared_zone zone=ngx_acme_shared:1M; + + server { + listen 443 ssl; + server_name mylocalwebsite.com; + + acme_certificate acme_staging; + + ssl_certificate $acme_certificate; + ssl_certificate_key $acme_certificate_key; + + # do not parse the certificate on each request + ssl_certificate_cache max=2; + + location / { + proxy_pass http://echo.sunnypup.io + } + } + + server { + # listener on port 80 is required to process ACME HTTP-01 challenges + listen 80; + + location / { + return 404; + } + } +}