Rename Site & Install SSL

Hi,

I’ve site named site1.local, i guess renaming the site according to specific is required for the SSL installation,
so can somebody please mention steps of the safest way for renaming the existing site and installing SSL after renaming. because i am on the live server.

There is no need to rename the sitename for ssl installation .
So if you want to rename the sitename use command
“mv oldsitename newsitename” and you can proceed with ssl

@PratikM34 thanks for your reply,

Just clear me that no need to rename the sitename for ssl?
no i’ve to run just two commands for ssl installation?

bench config dns_multitenant on
sudo bench setup lets-encrypt site1.local

and i can access it using https://erp.mydomain.com ?

thats it?

I tried sudo bench setup lets-encrypt site1.local and got below error and SSL not installed, nothing happened.

Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let's Encrypt project and the non-profit
organization that develops Certbot? We'd like to send you email about our work
encrypting the web, EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: Y
Obtaining a new certificate
An unexpected error occurred:
The server will not issue certificates for the identifier :: Error creating new order :: Cannot issue for "site1.local": Domain name does not end with a valid public suffix (TLD)
Please see the logfiles in /var/log/letsencrypt for more details.

IMPORTANT NOTES:
 - Your account credentials have been saved in your Certbot
   configuration directory at /etc/letsencrypt. You should make a
   secure backup of this folder now. This configuration directory will
   also contain certificates and private keys obtained by Certbot so
   making regular backups of this folder is ideal.
INFO:bench.utils:sudo systemctl start nginx
There was a problem trying to setup SSL for your site

@shahid
If you are using lets-encrypt keep your site name and server name the same and then try with the above command.

Then what is way for using SSL without renaming the sitename?

@shahid
For a while you try using the same site name as server name .

Create a new site with same name as server name , take the dump of old site and restore in your new site which will be same as your server name.

1 Like

Ok as far as i got is,

1st Step : Turn on dns based multitenancy,
2nd Step : create new site as same as domain name,
3rd Step : take backup of old site, and restore to new one,
4rth Step : sudo bench setup lets-encrypt [domain name same as sitename]

Questions : can’t i rename old site? because i did mv oldsitename newsitename then its shows Sorry! We will be back soon.
2nd Question is after creating new site and restoring the old one into it, should i delete old site? named site1.local.

@shahid

You can proceed with your above steps.

1- Rename should work but don’t know why it’s showing such error.
2- No need to delete the old site.

1 Like

Thanks, let me try.