How to activate 2 ports 80 and 4000 for one domain with SSL support?
I'm new to SSL encryption and need help! (Using cert bot).
I recently activated SSL on a website that runs on apache and linux on port 80. So the current website looks like this:
http://example.com --> https://example.com (done)
However, I have a backend running on port 4000 and you want to encrypt this to avoid the Mixed Content page error:
http://example.com:4000 --> https://example.com:4000 (Not done yet)
This is exactly what I need and no amount of work around would help. Please guide.
Thanks in advance!: -)
source to share
You can create a new subdomain subdomain.example.com
and point it to example.com:4000
, then request a new SSL certificate from LetsEncrypt and specify multiple subdomains when requesting a certificate using certbot.
certbot certonly --webroot -w /var/www/example/ -d www.example.com -d example.com -w /var/www/other -d other.example.net -d another.other.example.net
Once you have the certificate and key, add it to your web server config
Check out the official certbot documentation here
source to share