问题原文
原帖链接 · Alex · CC BY-SA 3.0
I want to get a certificate via the letsencrypt.sh so I have to provide a challenge on HTTP.
Already I use NGINX to forward to SSL (served on a nodejs server). Now I want to still redirect everything to SSL, but not the challenge.
Here is my config
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /usr/share/nginx/html;
server_name screen.example.com;
location /.well-known { }
location / {
return 301 https://$server_name$request_uri;
}
}
Opening a challenge URL still redirects me to HTTPS.
How can I fix this?
已采纳解答
原帖链接 · Alex · CC BY-SA 3.0
Oh my, the config seems to work. I just requested the wrong path.
The letsencrypt.sh's default is .acme-challenges - I changed this to
WELLKNOWN="/usr/share/nginx/html/.well-known/acme-challenge" in config.sh
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
