python - Django-uWSGI-nginx using https -
i'm running django app using uwsgi on nginx. it's working these configurations:
[uwsgi] socket = :8002
master = true
env = django_settings_module=web_server.web_server.settings
pythonpath = /tmp/src/
wsgi-file = /tmp/src/web_server/web_server/wsgi.py
chdir = /tmp/src/
processes = 4
threads = 2
and nginx.conf file
upstream django {
server 127.0.0.1:8002;
}
server {
listen 8000;
server_name 192.168.56.104;
charset utf-8;
# finally, send non-media requests django server.
location / {
uwsgi_pass django; include /tmp/src/web_server/web_server/uwsgi_params;
}
it's working http.
i want alter work https, can't find right configuration create work anywhere.
what should alter in configuration in order work https?
i have generated certificate .
chris's comment helped me find solution. in ssl certificate installation in nginx can find this:
ssl on;
ssl_certificate /etc/ssl/your_domain_name.pem; (or bundle.crt)
ssl_certificate_key /etc/ssl/your_domain_name.key;
i added nginx .conf file , added https web server. final .conf file looks this:
upstream django {
server 127.0.0.1:8002;
}
server {
listen 8000;
ssl on;
ssl_certificate /etc/ssl/your_domain_name.pem; (or bundle.crt)
ssl_certificate_key /etc/ssl/your_domain_name.key;
server_name 192.168.56.104;
charset utf-8;
# finally, send non-media requests django server.
location / {
uwsgi_pass django; include /tmp/src/web_server/web_server/uwsgi_params;
}
python django nginx https uwsgi
No comments:
Post a Comment