magento-cloud-docker icon indicating copy to clipboard operation
magento-cloud-docker copied to clipboard

Magento 2 Cloud Docker SSL certificate hostname change

Open harendraprajapati opened this issue 2 years ago • 1 comments

I am using setup my local Cloud Docker https://devdocs.magento.com/cloud/docker/docker-development.html

local hostname set - test.test

To configure the custom host and port, add the host and port options to the build:compose command.

./vendor/bin/ece-docker build:compose --host=test.test --port=80

Still SSL certificate showing default magento2.docker on browser. How to change SSL certificate name as host. needed to DNS- test.test

Please let me know how change certificate name in magento2 docker cloud deploying into localhost.

harendraprajapati avatar Sep 04 '22 01:09 harendraprajapati

Something to try, seen it on slack havent tried it myself yet as we bought a cheap ssl cert

Install mkcert https://github.com/FiloSottile/mkcert Run initial mkcert commands to get CA installed Generate your ssl for whatever you want it to be After generating the key pair I had to add it to the tls container: tls: volumes: - './.docker/magento2.docker-key.pem:/etc/nginx/ssl/magento.key' -'./.docker/magento2.docker.pem:/etc/nginx/ssl/magento.crt'

birdman002 avatar Sep 06 '22 16:09 birdman002