Letsencrypt certificate for www and non-www domain

后端 未结 1 1167
南旧
南旧 2021-02-02 12:37

I have generated SSL certificate like so:

sudo git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt
./letsencrypt-auto certonly --standalone


        
相关标签:
1条回答
  • 2021-02-02 13:01

    You do not need to remove the installed certificate.

    You can extend it to your sub-domain if you're using the same domain. Do the following:

    sudo certbot certonly --standalone -d domain.com -d www.domain.com
    

    When prompted for Expanding or Cancelling, reply with E then hit Enter key on your keyboard.

    The certificate should be setup successfully.

    If you encounter this error: Problem binding to port 80: Could not bind to IPv4 or IPv6, stop apache by running systemctl stop apache2 then run the above certbot command again.

    Once the ssl certificate is successfuly setup, run systemctl restart apache2 to get apache up and running again.

    0 讨论(0)
提交回复
热议问题