ngx-acme-demo/nginx.conf
Ava Hahn 2ade911283 initial
Signed-off-by: Ava Hahn <a.hahn@f5.com>
2025-09-24 23:22:53 +00:00

43 lines
795 B
Nginx Configuration File

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;
}
}
}