CentOS 7.8.2003
Apache
www.exmple.comに現在アクセスできます。
サブドメインでnc.exmple.comでアクセスするため、
nc.confを作りました。
<VirtualHost *:80> ServerName nc.exmple.com DirectoryIndex index.html index.php AddDefaultCharset UTF-8 DocumentRoot /var/www/nc/ <Directory "/var/www/nc"> AllowOverride All </Directory> RewriteEngine on RewriteCond %{SERVER_NAME} =nc.exmple.com RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] </VirtualHost>
ところがブラウザでアクセスすると、www.exmple.comが表示されます。
SSL証明書を取りたくても
[root@suzunet nc]# certbot certonly --webroot -w /var/www/nc -d nc.exmple.com --agree-tos Saving debug log to /var/log/letsencrypt/letsencrypt.log Plugins selected: Authenticator webroot, Installer None Starting new HTTPS connection (1): acme-v02.api.letsencrypt.org Obtaining a new certificate Performing the following challenges: http-01 challenge for nc.exmple.com Using the webroot path /var/www/nc for all unmatched domains. Waiting for verification... Challenge failed for domain nc.exmple.com http-01 challenge for nc.exmple.com Cleaning up challenges Some challenges have failed. IMPORTANT NOTES: - The following errors were reported by the server: Domain: nc.exmple.com Type: unauthorized Detail: Invalid response from https://nc.exmple.com/.well-known/acme-challenge/tHUuftsWm3-Lm3VaSsoJiHgqQo5YPCePyA1Q-4_8EF8 [210.147.200.49]: "<!DOCTYPE html>\n<html lang=\"ja\" ng-app=\"NetCommonsApp\">\n<head>\n\t<meta charset=\"utf-8\">\n\t<meta http-equiv=\"X-UA-Compatible\" conte" To fix these errors, please make sure that your domain name was entered correctly and the DNS A/AAAA record(s) for that domain contain(s) the right IP address.
最終的には、サブドメインでアクセスできて、httpsでアクセスできるようにしたいです。
apacheのaccess.logです
66.133.109.36 - - [14/Jul/2020:22:25:04 +0900] "GET /.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0 HTTP/1.1" 301 301 "http://nc.exmple.com/.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0" "Mozilla/5.0 (compatible; Let's Encrypt validation server; +https://www.letsencrypt.org)" 66.133.109.36 - - [14/Jul/2020:22:25:04 +0900] "GET /.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0 HTTP/1.1" 301 301 "http://nc.exmple.com/.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0" "Mozilla/5.0 (compatible; Let's Encrypt validation server; +https://www.letsencrypt.org)" 66.133.109.36 - - [14/Jul/2020:22:25:05 +0900] "GET /.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0 HTTP/1.1" 301 301 "http://nc.exmple.com/.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0" "Mozilla/5.0 (compatible; Let's Encrypt validation server; +https://www.letsencrypt.org)" 66.133.109.36 - - [14/Jul/2020:22:25:05 +0900] "GET /.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0 HTTP/1.1" 301 301 "http://nc.exmple.com/.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0" "Mozilla/5.0 (compatible; Let's Encrypt validation server; +https://www.letsencrypt.org)" 18.196.96.172 - - [14/Jul/2020:22:25:05 +0900] "GET /.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0 HTTP/1.1" 301 301 "http://nc.exmple.com/.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0" "Mozilla/5.0 (compatible; Let's Encrypt validation server; +https://www.letsencrypt.org)" 18.196.96.172 - - [14/Jul/2020:22:25:05 +0900] "GET /.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0 HTTP/1.1" 301 301 "http://nc.exmple.com/.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0" "Mozilla/5.0 (compatible; Let's Encrypt validation server; +https://www.letsencrypt.org)" 66.133.109.36 - - [14/Jul/2020:22:25:05 +0900] "GET /.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0 HTTP/1.1" 301 301 "http://nc.exmple.com/.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0" "Mozilla/5.0 (compatible; Let's Encrypt validation server; +https://www.letsencrypt.org)" 66.133.109.36 - - [14/Jul/2020:22:25:05 +0900] "GET /.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0 HTTP/1.1" 301 301 "http://nc.exmple.com/.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0" "Mozilla/5.0 (compatible; Let's Encrypt validation server; +https://www.letsencrypt.org)" 18.196.96.172 - - [14/Jul/2020:22:25:05 +0900] "GET /.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0 HTTP/1.1" 301 301 "http://nc.exmple.com/.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0" "Mozilla/5.0 (compatible; Let's Encrypt validation server; +https://www.letsencrypt.org)" 18.196.96.172 - - [14/Jul/2020:22:25:05 +0900] "GET /.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0 HTTP/1.1" 301 301 "http://nc.exmple.com/.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0" "Mozilla/5.0 (compatible; Let's Encrypt validation server; +https://www.letsencrypt.org)" 66.133.109.36 - - [14/Jul/2020:22:25:06 +0900] "GET /.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0 HTTP/1.1" 301 301 "http://nc.exmple.com/.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0" "Mozilla/5.0 (compatible; Let's Encrypt validation server; +https://www.letsencrypt.org)" 66.133.109.36 - - [14/Jul/2020:22:25:06 +0900] "GET /.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0 HTTP/1.1" 301 301 "http://nc.exmple.com/.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0" "Mozilla/5.0 (compatible; Let's Encrypt validation server; +https://www.letsencrypt.org)" 66.133.109.36 - - [14/Jul/2020:22:25:06 +0900] "GET /.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0 HTTP/1.1" 301 301 "http://nc.exmple.com/.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0" "Mozilla/5.0 (compatible; Let's Encrypt validation server; +https://www.letsencrypt.org)" 66.133.109.36 - - [14/Jul/2020:22:25:06 +0900] "GET /.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0 HTTP/1.1" 301 301 "http://nc.exmple.com/.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0" "Mozilla/5.0 (compatible; Let's Encrypt validation server; +https://www.letsencrypt.org)" 18.196.96.172 - - [14/Jul/2020:22:25:06 +0900] "GET /.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0 HTTP/1.1" 301 301 "http://nc.exmple.com/.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0" "Mozilla/5.0 (compatible; Let's Encrypt validation server; +https://www.letsencrypt.org)" 18.196.96.172 - - [14/Jul/2020:22:25:06 +0900] "GET /.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0 HTTP/1.1" 301 301 "http://nc.exmple.com/.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0" "Mozilla/5.0 (compatible; Let's Encrypt validation server; +https://www.letsencrypt.org)" 66.133.109.36 - - [14/Jul/2020:22:25:06 +0900] "GET /.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0 HTTP/1.1" 301 301 "http://nc.exmple.com/.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0" "Mozilla/5.0 (compatible; Let's Encrypt validation server; +https://www.letsencrypt.org)" 66.133.109.36 - - [14/Jul/2020:22:25:06 +0900] "GET /.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0 HTTP/1.1" 301 301 "http://nc.exmple.com/.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0" "Mozilla/5.0 (compatible; Let's Encrypt validation server; +https://www.letsencrypt.org)" 18.196.96.172 - - [14/Jul/2020:22:25:07 +0900] "GET /.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0 HTTP/1.1" 301 301 "http://nc.exmple.com/.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0" "Mozilla/5.0 (compatible; Let's Encrypt validation server; +https://www.letsencrypt.org)" 18.196.96.172 - - [14/Jul/2020:22:25:07 +0900] "GET /.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0 HTTP/1.1" 301 301 "http://nc.exmple.com/.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0" "Mozilla/5.0 (compatible; Let's Encrypt validation server; +https://www.letsencrypt.org)" 66.133.109.36 - - [14/Jul/2020:22:25:07 +0900] "GET /.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0 HTTP/1.1" 301 301 "http://nc.exmple.com/.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0" "Mozilla/5.0 (compatible; Let's Encrypt validation server; +https://www.letsencrypt.org)" 66.133.109.36 - - [14/Jul/2020:22:25:07 +0900] "GET /.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0 HTTP/1.1" 301 301 "http://nc.exmple.com/.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0" "Mozilla/5.0 (compatible; Let's Encrypt validation server; +https://www.letsencrypt.org)" 66.133.109.36 - - [14/Jul/2020:22:25:07 +0900] "GET /.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0 HTTP/1.1" 301 301 "http://nc.exmple.com/.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0" "Mozilla/5.0 (compatible; Let's Encrypt validation server; +https://www.letsencrypt.org)" 66.133.109.36 - - [14/Jul/2020:22:25:07 +0900] "GET /.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0 HTTP/1.1" 301 301 "http://nc.exmple.com/.well-known/acme-challenge/CqpUtJ805uBUI4l6BqBtVM8qgsECSqmrG5YWf5QFJe0" "Mozilla/5.0 (compatible; Let's Encrypt validation server; +https://www.letsencrypt.org)"
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2020/07/14 13:29
2020/07/14 13:35
2020/07/15 04:11
2020/07/15 05:21