
SSL을 생성하려고 할 때 오류가 계속 발생하는 것을 제외하고는 잘 작동하는 것 같은 가상 호스트가 있습니다. 무엇이 잘못되고 있는지 알아내는 데 도움을 줄 수 있습니까? 감사해요
example.com: Domain could not be validated, error message: error type: urn:ietf:params:acme:error:unauthorized, error detail:
192.168.9.123: Invalid response from https://example.com/.well-known/acme-challenge/NOHITCjOoL1lpdh-Oh1pHUSnXvkSk00ksjBeVCWA2cY: 404
nginx 가상 호스트 구성:
upstream domain-default {
zone domain-default 64k;
server 172.31.7.1:9001;
keepalive 2;
}
upstream domain-ws {
zone domain-ws 64k;
server 172.31.7.1:3012;
keepalive 2;
}
# Redirect HTTP to HTTPS
server {
listen 80;
listen [::]:80;
server_name example.com;
return 301 https://$host$request_uri;
{{root}}
location ~ /.well-known {
allow all;
{{root}}
}
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name example.com;
if ($scheme != "https") {
rewrite ^ https://$host$uri permanent;
}
{{ssl_certificate_key}}
{{ssl_certificate}}
client_max_body_size 128M;
location / {
proxy_http_version 1.1;
proxy_set_header "Connection" "";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://domain-default;
}
location /notifications/hub/negotiate {
proxy_http_version 1.1;
proxy_set_header "Connection" "";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://domain-default;
}
location /notifications/hub {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Forwarded $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://domain-ws;
}
location ~ /.well-known {
allow all;
}
}
답변1
오류 자체에 example.com 도메인을 확인할 수 없습니다. example.com을 귀하의 도메인으로 바꿔야 합니다. 서버의 IP 주소를 도메인 이름으로 지정하는 것을 잊지 마십시오. 그러면 완료됩니다.