cupcakearmy/cryptgeon

nginx with TLS

Closed this issue ยท 2 comments

I'm trying to use the Nginx example. I can get the http page to load (using port 80). ๐Ÿ‘๐Ÿป

But when I comment the reference to ./nginx-plain.conf and uncomment the reference to ./nginx-tls.conf, I am presented with this error (when I try to access the https page):

Secure Connection Failed
An error occurred during a connection to <server_name_here>. PR_END_OF_FILE_ERROR
Error code: PR_END_OF_FILE_ERROR

Is it OK that the /etc/nginx/conf.d/default.conf file does not exist on my server?
(Line 17 in the docker-compose.yaml file references this file.)

Also, should the ports (line 21 in docker-compose.yaml) get updated from 80:80 to 443:443?

Thanks!

It's also worth mentioned that the "proxy" service is "Started" when I run the sudo docker compose up -d command.
But when I run sudo docker ps I don't see a docker container for nginx (nginx:alpine).

The nginx service is only visible in the docker ps output when I use non-https (nginx-plain.conf).

I think I fixed the problem.

I needed to add 1 additional line to the volumes: collection, within the docker-compose.yaml file:

    volumes:
      - ./nginx-tls.conf:/etc/nginx/conf.d/default.conf
      - ./certs:/opt/cryptgeon/certs

I then updated the nginx-tls.conf file with the absolute path to the (3) .pem files.
Example:
ssl_certificate /path/to/certs/mycert.pem;