question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

https without letsencrypt

See original GitHub issue

Hi,

I am behind a corporate proxy that could not resolve the ACME challenge. Therefore, I would like to run the application with auto generated SSL certificates:

openssl req -new -x509 -nodes -newkey rsa:2048 -keyout .certs/${NGINX_HOSTNAME}.key -out .certs/${NGINX_HOSTNAME}.crt \
		-subj "/C=FR/ST=France/L=Paris/O=Private/CN=${NGINX_HOSTNAME}"

Then I used a docker-compose.yml

version: '2.1'

services:

  nginx-proxy:
    image: jwilder/nginx-proxy:${NGINX_PROXY_TAG}
    container_name: nginx-proxy
    ports:
      - '${NGINX_PROXY_HTTP}:80'
      - '${NGINX_PROXY_HTTPS}:443'
    volumes:
      - /var/run/docker.sock:/tmp/docker.sock:ro
      - ./certs:/etc/nginx/certs
    restart: always

  whoami:
    image: jwilder/whoami
    container_name: whoami
    environment:
      - VIRTUAL_HOST=${NGINX_HOSTNAME}

networks:
  default:
    external:
      name: ${NGINX_PROXY_NET}

The http works fine: http://${NGINX_HOSTNAME}😒{NGINX_PROXY_HTTP}

but not the https version: https://${NGINX_HOSTNAME}😒{NGINX_PROXY_HTTPS}

I do not manage to find the cause.

Plus the logs are empty

docker-compose logs -f
Attaching to nginx-proxy, whoami

Could you please help me on this ?

Thank you

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
gerrytsuicommented, Oct 23, 2018

@Starli0n , I believe the nginx is looking for the .csr file (not .crt)

in my staging environment I have all three files ( .csr .crt .key)

1reaction
gerrytsuicommented, Oct 25, 2018

I use the letsencrypt certbot-auto to get those 3 files (see below) I am NOT using the JrCs/docker-letsencrypt-nginx-proxy-companion image To renew I have “certbot-auto renew --quiet --no-self-upgrade” in a root crontab.
along with: cp /etc/letsencrypt/live/DOMAIN/privkey.pem PATH/certs/DOMAIN.key cp /etc/letsencrypt/live/DOMAIN/chain.pem PATH/certs/DOMAIN.csr cp /etc/letsencrypt/live/DOMAIN/fullchain.pem PATH/certs/DOMAIN.crt

you also need to make sure that you set the right permission so the Docker container can read the files.

Read more comments on GitHub >

github_iconTop Results From Across the Web

In 2022, is it now possible to get SSL without a domain (and ...
"In 2022, is it now possible to get SSL without a domain (and only an IP address)?". From a paid commercial CA, Yes....
Read more >
How to get a https address? (No Let's Encrypt) - Installation
OS: Ubuntu 20.04 Hi everyone, I've been tinkering with it the whole day today, and I was wondering if anyone might be able...
Read more >
SSL Configuration Not Using Letsencrypt - GitLab Forum
It seems to be very much tailored to Letsencrypt. https://docs.gitlab.com/omnibus/settings/ssl.html We are using a Wildcard Certificate ...
Read more >
Automatic HTTPS — Caddy Documentation
Caddy uses safe and modern defaults -- no downtime, extra configuration, ... HTTPS using certificates from a public ACME CA such as Let's...
Read more >
Update: Using Free Let's Encrypt SSL/TLS Certificates with ...
https ://github.com/certbot/... Tony Mauro • 1 year ago. Hi Sean: Thanks for this warning, and sorry for not responding to it when ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found