Excuse me, do you use flask to do Mini Program? please tell me the configuration of Nginx. Thank you.

* * do you use flask to be Mini Program"s friend

ask about Nginx configuration https configuration

Thank you

I really don"t know how to match. No, no, no. * *

< hr >

the problem may be how to configure https in the flask production environment.
look confused

Apr.07,2021

configure HTTPS-Ali Cloud


this is the detailed step for my blog to configure https- https://www.os373.cn/article/114


first, on the domain name page, find ssl certificate application Aliyun-certificate application , option page
as follows:
clipboard.png

you need to apply in advance, prepare the corresponding authentication documents, submit the application for review, and download the ssl certificate after the application is passed, and upload it to the nginx server.
configure nginx proxy file

server {
        listen       443;
        server_name  domain;


        ssl          on;
        ssl_certificate /ssl/domain/213981786400525.pem;  -sharp ssl
        ssl_certificate_key /ssl/domain/213981786400525.key;  -sharp sslkey


        location / {
                 proxy_pass http://127.0.0.1:8089;
                 error_page 550 = @550;
                 error_page 551 = @551;
                }
        location @550 {
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_pass http://127.0.0.1:8000;
        }
        location @551 {
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_pass http://127.0.0.1:81;
        }
}
Menu