Certbot ile internet siteniz example.com olarak cevap veriyor ancak www.example.com olarak sertifika hatası veriyorsa bunun çözümü oldukça basit.
Öncelikle sorunun tespiti için aşağıdaki komutu çalıştırın.
certbot certificatesCode language: Shell Session (shell)
Karşınıza aşağıdaki gibi bir çıktı gelecek.
Found the following certs:
Certificate Name: example.com
Domains: example.com
Expiry Date: 2022-05-02 18:16:59+00:00 (VALID: 88 days)
Certificate Path: /etc/letsencrypt/live/example.com/fullchain.pem
Private Key Path: /etc/letsencrypt/live/example.com/privkey.pemCode language: Shell Session (shell)
Burada 3. satırda yer alan Domains: kısmında yer alan şekliyle olan siteniz çalışıyor ve diğer alternatif (bu örnekte www.example.com) çalışmıyor. Şimdi bu sertifikaya www alternatifini de ekleyeceğiz.
sudo certbot certonly --cert-name example.com -d example.com,www.example.comCode language: Shell Session (shell)
Şimdi size hangi yöntem ile yapacağını soracak.
How would you like to authenticate with the ACME CA?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: Apache Web Server plugin (apache)
2: Spin up a temporary webserver (standalone)
3: Place files in webroot directory (webroot)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Code language: Shell Session (shell)
Ben Apache sunucunda olduğum için 1 numarayı seçtim. Son olarak Apache servisini yeniden başlatalım
sudo service apache2 restartCode language: Shell Session (shell)
Bir yanıt yazın