Several questions about opening https by nginx

< H1 > problem description < / H1 >

is currently developing a Django project. If you want to use gunicorn as a http server, and then use nginx as a reverse proxy, you will eventually need to use https.
my question is:

  1. can I run a statement like gunicorn my_project:wsgi to open the http server without making any changes to the Django project, and then use nginx to manage https things?
  2. if you can, do you just need to configure nginx? If not, where should I add configuration information?

generally you can configure https as long as you configure Nginx. The application server does not need to worry about http or https


configure https in the config file of Nginx and redirect requests to the port of gunicron.

Menu