简体   繁体   中英

Docker nginx proxy cannot access dhprams

I generated ssl certificate using letsencrypte but when I ran my docker container this error came

proxy_1    | Checking for dhparams.pem
proxy_1    | Checking for fullchain.pem
proxy_1    | SSL cert exists, enabling HTTPS...
proxy_1    | 2022/12/01 22:31:45 [emerg] 8#8: PEM_read_bio_DHparams("/vol/proxy/ssl-dhparams.pem") failed (SSL: error:0909006C:PEM routines:get_name:no start line:Expecting: DH PARAMETERS)
proxy_1    | nginx: [emerg] PEM_read_bio_DHparams("/vol/proxy/ssl-dhparams.pem") failed (SSL: error:0909006C:PEM routines:get_name:no start line:Expecting: DH PARAMETERS)

It should start proxy server with ssl I am following this guide and I don not know how to fix this https://londonappdeveloper.com/django-docker-deployment-with-https-using-letsencrypt/

I had the same issue on the same tuto, for some reason the dhparams.pem seemed corrupted or empty. I just removed the files by deleting the volumes

docker-compose down -v

then obtaining the certificate

docker-compose run --rm certbot /opt/certify-init.sh

and finally re-up the docker-compose (no re-build)

docker-compose up -d

For me that worked, I hope it can help someone.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM