0

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

asked Sep 4, 2022 at 1:56

1 Answer 1

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

answered Apr 7, 2023 at 12:47

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.