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.
Thanks; HP
1 Answer 1
Assuming that you are using the latest version of Magento2, Navigate to [MAGENTO_ROOT]/vendor/magento/magento-cloud-docker/images/nginx/[NGINX_VERSION]/Dockerfile and look for the code
RUN openssl req -x509 -newkey rsa:2048 -sha256 -days 730 -nodes \ -keyout /etc/nginx/ssl/magento.key -out /etc/nginx/ssl/magento.crt \ -subj "/C=US/ST=TX/L=Austin/O=Adobe Commerce/OU=Cloud Docker/CN=magento2.docker" \ -addext "subjectAltName=DNS:magento2.docker,DNS:www.magento2.docker"
Here you can change the domain name for your SSL Certificate DNS:www.magento2.docker
In my case its the path to Dockerfile is
[MAGENTO_ROOT]/vendor/magento/magento-cloud-docker/images/nginx/1.19/Dockerfile
Explore related questions
See similar questions with these tags.