DEV Community

Discussion on: Hosting WordPress over HTTPS with Docker

Collapse
 
mani1soni profile image
Manish Soni • Edited

Hi,
While running the setup, i'm getting following error in "nginx-proxy" container.

" open() "/etc/letsencrypt/options-ssl-nginx.conf" failed (2: No such file or directory) in /etc/nginx/nginx.conf:25
nginx: [emerg] open() "/etc/letsencrypt/options-ssl-nginx.conf" failed (2: No such file or directory) in /etc/nginx/nginx.conf:25
Saving debug log to /var/log/letsencrypt/letsencrypt.log ".

My folder structure is below like this---->

proxy /
crontab docker-compose.yml Dockerfile etc nginx.conf startup.sh

wordpress-nginx/
docker-compose.yml logs mysql nginx nginx.conf wordpress

and my "nginx-wordpress" container gives following error.

" /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: error: /etc/nginx/conf.d/default.conf is not a file or does not exist"

can you help.
Thanks

Collapse
 
foresthoffman profile image
Forest Hoffman

Howdy!

I believe this is an issue coming from the certbot tool, which is executed by the proxy/startup.sh script. You'll want to make sure that your nginx-proxy is accessible from outside your network. As the certbot tool will attempt to verify that the domain you've listed is actually owned by you. If your DNS provider is not already pointing to your domain, where the nginx-proxy is accessible, that would prevent the certifications from being verified.

If your domain is already correctly pointing to where your proxy will be running, you can try firing up the nginx-proxy without the startup.sh script. You'll want to comment-out the proxy/docker-compose.yml line that runs the script on docker startup (i.e. command: bash -c "startup.sh"). This should allow you to run docker-compose up on the proxy without it immediately crashing. From there, you can connect to the container and attempt to run the certbot commands manually.

Hopefully that will give you a better idea of what's going on. Best of luck! :)

Collapse
 
mani1soni profile image
Manish Soni

Thanks,
I'll try with that process and let you know.