Let's encryptを用いて、httpsにしようと考えました。
サーバーは、さくらVPSで、OSは、Ubuntu16.04です。
サイトはNginxを用いて動かしています。
そのため、下記を参考にしようとしました。
https://certbot.eff.org/#ubuntuxenial-nginx
$ sudo apt-get install letsencrypt
は、うまくいきました。
しかし、
$ sudo letsencrypt certonly --webroot -w /var/www/html -d example.com -d www.example.com
を実行すると、
Failed authorization procedure. www.example.com (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://www.example.com/.well-known/acme-challenge/W7nzNEIKJXgIMa3pHZPTbb_9ZoyLmESqRuChaGuIWZU: "<h1>Not Found</h1><p>The requested URL /.well-known/acme-challenge/W7nzNEIKJXgIMa3pHZPTbb_9ZoyLmESqRuChaGuIWZU was not found on ", example.com (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://example.com/.well-known/acme-challenge/EY6TbDFYmuBbiK_j-uXLs8gusaOD5hafNjt3e1RN9zg: "<h1>Not Found</h1><p>The requested URL /.well-known/acme-challenge/EY6TbDFYmuBbiK_j-uXLs8gusaOD5hafNjt3e1RN9zg was not found on " IMPORTANT NOTES: - The following errors were reported by the server: Domain: www.example.com Type: unauthorized Detail: Invalid response from http://www.example.com /.well-known/acme- challenge/W7nzNEIKJXgIMa3pHZPTbb_9ZoyLmESqRuChaGuIWZU: "<h1>Not Found</h1><p>The requested URL /.well-known/acme- challenge/W7nzNEIKJXgIMa3pHZPTbb_9ZoyLmESqRuChaGuIWZU was not found on " Domain: example.com Type: unauthorized Detail: Invalid response from http://example.com/.well- known/acme-challenge/EY6TbDFYmuBbiK_j-uXLs8gusaOD5hafNjt3e1RN9zg: "<h1>Not Found</h1><p>The requested URL /.well-known/acme-challenge /EY6TbDFYmuBbiK_j-uXLs8gusaOD5hafNjt3e1RN9zg was not found on " To fix these errors, please make sure that your domain name was entered correctly and the DNS A record(s) for that domain contain(s) the right IP address.
というエラーが出てしまいます。
なお、
/etc/nginx/sites-available/default
には、
upstream example{ server 127.0.0.1:8000; } server{ listen 80 default_server; listen [::]:80 default_server ipv6only=on; access_log /var/log/nginx/localhost.access_log; root /var/www/html; server_name localhost; location / { proxy_set_header Host $host; proxy_pass http://hinaya_web; } }
となっていたので、
-w /var/www/html
で良いのかと思いました。
どこが悪いかお分かりの方、ご教示頂ければ幸いです。
よろしくお願いいたします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2017/02/01 06:37