SSL Setup along with www - jigneshpshah/greycube_helpmanual GitHub Wiki
[A.1] bench config dns_multitenant on
sudo -H bench setup lets-encrypt [site-name]
Steps to add www to existing setup
[1]
frappe@server:/opt$ sudo service nginx stop
frappe@server:/opt$ sudo ./certbot-auto certonly --cert-name domain.com --standalone -d domain.com -d www.domain.com --expand
Output:
IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/domain.com/fullchain.pem
[2] Note the path of cert and set it in site_config.json. Also put domain block with www
{
"ssl_certificate": "/etc/letsencrypt/live/domain.com/fullchain.pem",
"nginx_port": 80
},
"ssl_certificate_key": "/etc/letsencrypt/live/domain.com/privkey.pem",
"domains": [
"domain.com",
{
"domain": "www.domain.com",
"ssl_certificate": "/etc/letsencrypt/live/domain.com/fullchain.pem",
"ssl_certificate_key": "/etc/letsencrypt/live/domain.com/privkey.pem"
}
]
}
Repeat step 2 for each domain
[3]
$ bench setup nginx
$ sudo service nginx start
Above, steps ensures your following URL are working
http://domain.com
https://domain.com
http://www.domain.com/
https://www.domain.com/