Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setup Gunicorn with let's encrypt cert

To secure my website, I've used Let's encyprt certbot for generating privkey.pem, cert.pem, chain.pem, and fullchain.pem

When I connect my website from desktop chrome or firefox, it seems to be ok. but when I connect mobile browser such as chrome-android, It blocks connection and shows untrusted certificate authority.

I'm using Django==1.9.7 and gunicorn==19.6.0. and Here is my gunicorn configuration file:

bind = '0.0.0.0:443'
workers = 4
worker_class = 'gevent'
worker_connections = 1000
keepalive = 5

keyfile = 'privkey.pem'
certfile = 'cert.pem'

What am I missing?

like image 863
makerj Avatar asked Jun 09 '16 05:06

makerj


1 Answers

I've resolved this issue myself. The problem was caused by missing key chain file in the gunicorn configuration.

So, currently my configuration file is:

bind = '0.0.0.0:443'
workers = 4
worker_class = 'gevent'
worker_connections = 1000
keepalive = 5

keyfile = 'privkey.pem'
certfile = 'cert.pem'
ca_certs = 'chain.pem'
like image 106
makerj Avatar answered Nov 08 '22 04:11

makerj