Add More Certbot HTTPS Domain License

Add New Certbot HTTPS Domain License

Parent Document:
Complete Walkthrough to Create a WordPress Production Platform – TDMM.net

Add new https site to the existing https domains: new.otherdomain.com and new.myregistereddomain.com:

  1. Create NS Record on DNS server
    • new.myregistereddomain.com = Same domain: use CNAME record point to @
    • new.otherdomain.com = Different domain: use A record point to server IP
      Wait for the change to resolve.
  2. Test the new domain on browser using http
    http://new.myregistereddomain.com
    http://new.otherdomain.com
    Domain should resolve to Nginx root index page /var/www/html
  3. Add new multisite network for otherdomain.com
  4. Register the new domain on nginx server configurationAdd the new domain name to the server_name on nginx server configuration
    sudo nano /etc/nginx/site-available/myregistereddomain.conf
      server_name myregistereddomain.com www.myregistereddomain.com new.myregistereddomain.com new.otherdomain.com;

    [Control-x], [y], [Enter] to save and exit nano.

  5. Expand Certbot/LetsEncrypt certificate for the new domain
    Use certbot command with –expand modifier, add all old domains and new domains.

    sudo certbot certonly --webroot --expand --renew -w /var/www/wordpress -d myregistereddomain.com -d www.myregistereddomain.com -d new.myregistereddomain.com -d new.otherdomain.com --dry-run

     

    If result success without error, delete –dry-run and run the command

  6. Check SSL certificate path (if path changed)
  7. Update SSL path if different than the old one (if path changed):
    sudo nano /etc/nginx/snippets/ssl-myserverdomain.com.conf
    ssl_certificate /etc/letsencrypt/live/myregistereddomain.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/myregistereddomain.com/privkey.pem;

    [Control-x], [y], [Enter] to save and exit nano.

  8. Restart nginx
    sudo nginx -t
    sudo service nginx reload
Advertisements

One thought on “Add More Certbot HTTPS Domain License”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s