I’m looking to test integrating some services which require https. Are there any guides to help with using a self signed certificates on localhost for django and nginx?
I’m having trouble finding tutorials that work, even just for django. I’ve got a feeling there’s some implied steps that I haven’t worked out.
Some methods I’ve tried include:
pip install werkzeug
pip install pyOpenSSL
INSTALLED_APPS [
'django-extensions',
]
python manage.py runserver_plus --cert-file cert.crt
Apparently when the browser shows the security warning you can accept the self signed certificate. However this isn’t working for me on Chromium and Firefox ESR. I don’t get https with the padlock.
I tried the code “thisisunsafe” on the Chromium browser tab which loads the page but still not with https.
Another method I tried with my productions settings in localhost:
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout ssl/mysite.key -out ssl/mysite.crt
Then updating the nginx.conf to listen on 443. I get the same browser warnings.
I’ve gone through some videos on youtube that require DNS port forwarding or that use a different setup with apache that I wasn’t able to fully translate to my setup.
I’m kind of confused with https during development. I’ve seen some comments where people say it’s not possible or that getting https working on the development site is more effort than it’s worth. But then there are other quick tutorials for self signed certificates which just aren’t working for me when I proceed with the insecure warning.
Lets Encrypt recommends using certbot with either automated or manual setup, both seem to require some validation that the site mysite.com belongs to me, which it doesn’t I’m just using it as my localhost.
Are there any guides people know of to get self signed certificates working on django to test services like Facebook authentication?.Thanks