
그래서 certbot을 사용하여 EC2의 WordPress 사이트에 대한 LetsEncrypt 인증서를 얻으려고 시도했지만(Bitnami의 AWS Marketplace 이미지, Ubuntu 14.04 사용) certbot --apache를 실행할 때 다음을 얻습니다.
Error while running apache2ctl graceful.
httpd not running, trying to start
Action 'graceful' failed.
The Apache error log may have more information.
AH00112: Warning: DocumentRoot [/var/lib/letsencrypt/tls_sni_01_page/] does not exist
AH00112: Warning: DocumentRoot [/var/lib/letsencrypt/tls_sni_01_page/] does not exist
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
(98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
AH00015: Unable to open logs
그래서 로그 파일에는 아무 것도 없는 것 같습니다. 서비스 apache2 상태를 실행하면 "apache2가 실행되고 있지 않습니다"가 표시됩니다.
그럼 내가 그랬어
sudo lsof -i :80 | grep LISTEN
이것은 나에게 -
httpd.bin 1584 root 4u IPv6 9463 0t0 TCP *:http (LISTEN)
httpd.bin 1589 daemon 4u IPv6 9463 0t0 TCP *:http (LISTEN)
httpd.bin 1590 daemon 4u IPv6 9463 0t0 TCP *:http (LISTEN)
httpd.bin 1773 daemon 4u IPv6 9463 0t0 TCP *:http (LISTEN)
비슷한 결과가 나왔습니다
sudo netstat -tulpn | grep :80
이것은 나에게 준다
tcp6 0 0 :::80 :::* LISTEN 1584/httpd.bin
Apache가 실제로 실행되고 있지만 동일한 버전이 아닌 것 같나요? 비슷한 문제를 겪은 사람이 있습니까?
감사해요!
답변1
Listen
지시어 설정은 무엇입니까? Linux에서 IPv4 및 IPv6 주소를 모두 수신하는 경우 유일한 방법은 매핑된 주소를 사용하는 것입니다. 그렇기 때문에 netstat
관련 Apache 문서는 여기에 있습니다.https://httpd.apache.org/docs/2.2/bind.html
certbot
이제 실행에서 오류가 발생하는 이유에 대해 설명합니다 . Apache는 명령을 통해 service
시작/중지/다시 시작/다시 로드됩니까? 아니면 이와 같은 스크립트를 호출하거나 를 사용하여 수행됩니까 ? 이 일이 지속적으로 이루어지고 있나요?/etc/init.d/apache2
apache2ctl
다음 방법 중 하나를 선택하고, 아파치를 중지하고, 중지된 것으로 보고되는지 확인하고, 아파치를 다시 시작하고, 실행 중인 것으로 보고되는지 확인하세요. 그런 다음 다른 유틸리티의 상태를 확인하고 동의하는지 확인하십시오.
모든 방법에서 Apache가 실제로 실행 중이라는 데 동의하면 certbot을 실행해 보세요. 하지만 솔직히 말해서 certonly
해당 옵션을 구현하는 것이 상당히 간단하다는 것을 알았습니다(이 작업을 수행하려면 Apache를 중지해야 함 - certbot
/ letsencrypt
프로세스의 일부로 443/80에서 자체 리스너를 생성해야 함). 관련 변경 사항을 내 Apache 구성 중국어에 수동으로 추가합니다. 파일