私はAWS Linuxを使用しています。これを使ってcertbot
私のウェブサイトをhttpからhttpsに変更したいと思います。
私が実行したとき:sudo certbot certonly --webroot -w ./ -d example——domain
エラーは次のとおりです。
Requested name http://example——domain appears to be a URL, not a FQDN. Try again without the leading "http://".
sudo certbot certonly --webroot -w ./ -d example——domain
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer None
Requesting a certificate for example——domain
Performing the following challenges:
http-01 challenge for example——domain
Using the webroot path /home/ec2-user/william for all unmatched domains.
Waiting for verification...
Challenge failed for domain example——domain
http-01 challenge for example——domain
Cleaning up challenges
Some challenges have failed.
IMPORTANT NOTES:
- The following errors were reported by the server:
Domain: example
Type: dns
Detail: DNS problem: NXDOMAIN looking up A for
example——domain - check that a DNS record exists
for this domain
Nginx設定:
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
root /usr/share/nginx/html;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
# disable checking file size for upload
client_max_body_size 0;
location / {
proxy_pass http://127.0.0.1:8000/;
proxy_set_header HOST \$host;
proxy_set_header X-Forwarded-Proto \$scheme;
proxy_set_header X-Real-IP \$remote_addr;
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
}
location /flower/ {
# rewrite ^/flower/(.*)$ /\$1 break;
proxy_pass http://127.0.0.1:5555/;
proxy_set_header HOST \$host;
proxy_set_header X-Forwarded-Proto \$scheme;
proxy_set_header X-Real-IP \$remote_addr;
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
}