I got this project started by a long gone coworker that’s in a docker container. I didn’t have prior knowledge to docker before it, but it has been working fine since then. But after I got my mac m1 I had to redo it a bit in order to make it compatible and I’ve got everything running except making it work on SSL.
It is a nginx + php project. I got well over a decade of experience with apache, so I’m new to nginx as well.
However, to my question.
The docker-compose.yml lists this image with some bind volumes. But nginx doesn’t seem to be able to read the SSL certificates and I’m just wondering how I can access them to debug what’s gone wrong.
Lets take the relevant snippets from the file:
services:
web:
image: nginx:latest
ports:
- "80:80"
- "443:443"
volumes:
- ./api:/api
- ./sites.conf:/etc/nginx/conf.d/sites.conf
- ./nginx.conf:/etc/nginx/nginx.conf
- ./snippets/self-signed.conf:/etc/nginx/snippets/self-signed.conf
- ./snippets/ssl-params.conf:/etc/nginx/snippets/ssl-params.conf
- ./ssl/dhparam.pem:/etc/ssl/dhparam.pem
- ./ssl/nginx-selfsigned.crt:/etc/ssl/nginx-selfsigned.crt
- ./ssl/nginx-selfsigned.key:/etc/ssl/nginx-selfsigned.key
It complain about not being able to access the /etc/ssl/nginx-selfsigned.key at the appropriate time. And when I log into the volume, I can’t see it either but I can’t see any of the other bind-volumes either. But they are apparently there because I can access it using the browser.
I quoted what happened when I tried in my other question in the mac forum,
So in my venture to see what the problem was, I disabled the loading of the certification and tried to log in to get it working. But ran into the problem of understanding how to actually do it.