flask_nginx_2
/
default.conf
29 строк · 582.0 Байт
1upstream flask_app {
2server flask:5000;
3server flask2:5000;
4server flask3:5000;
5}
6
7server {
8listen 80;
9server_name flask.com;
10
11return 301 https://$host$request_uri;
12}
13
14server {
15listen 443 ssl;
16server_name flask.com;
17
18ssl_certificate server.crt;
19ssl_certificate_key server.key;
20
21location / {
22proxy_pass http://flask_app;
23proxy_set_header Host $host;
24proxy_set_header X-Real-IP $remote_addr;
25proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
26proxy_set_header X-Forwarded-Proto $scheme;
27
28}
29}
30
31