1

I have a project where i need to set up a dev environment with letsEncrypt. Self signed cert doesn't work for me as i need to connect to react native, unless i tinker with the android code/ objective-C code, which i dont think is the right thing to do. (Ignore errors for self-signed SSL certs using the fetch API in a ReactNative App?)

I am aware there are some docker projects: https://hub.docker.com/r/jrcs/letsencrypt-nginx-proxy-companion/

I followed along to start the NGINX-LETSENCRYPT container, and bind them with my own container using:

docker run --name loginPOC -e "VIRTUAL_HOST=XPS15" -e "LETSENCRYPT_HOST=XPS15" -p 8000:80 -d f91893ef3a6f

Note: f91893ef3a6f(my C# image - web api)

XPS15(local machine)

i only get result when i connect to :

  1. http://xps15:8000/api/values [Works fine]

  2. https://xps15:8000/api/values [HTTPS] [Received "This site can’t provide a secure connection"]

I then check my cert status with

docker exec d9d1b9b5c933 /app/cert_status

Result:No cert status is found.

After some googling i found: https://letsencrypt.org/docs/certificates-for-localhost/ and https://community.letsencrypt.org/t/can-i-use-letsencrypt-in-localhost/21741

I have few questions in mind: 1. Most of the examples they have a top level in their domain name. My doubt is perhaps XPS15 is not a valid host name ?

Appreciate if anyone knows any workaround. Thanks

3
  • 2
    You can't get a cert from Let's Encrypt for a domain you don't control. xps15 is not a valid domain name as it is missing a TLD. Let's Encrypts servers either need to be able to reach yours over the internet via the domain name or you need to do DNS based validation. Either way it must be a valid domain name that you control. Commented May 15, 2018 at 17:02
  • I have never owned an iPhone so I probably can't help much, but there has got to be a simple way to add your self-signed cert to the trusted root cert repo on your device. Commented May 15, 2018 at 17:23
  • @paulpro thanks for pointing xps15 is not a valid domain. At least i know where the problem is at. BTW, most post that i have found linked me to stackoverflow.com/questions/32892161/… which the most recommended way is to use letsencrypt. Commented May 16, 2018 at 1:09

0

Your Answer

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.