-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disabling HTTPS and switching to Noto port
- Loading branch information
Showing
4 changed files
with
44 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
server { | ||
listen 80; | ||
server_name localhost; | ||
|
||
# redirect HTTP to HTTPS | ||
return 301 https://$host$request_uri; | ||
} | ||
|
||
upstream flask_nodes { | ||
ip_hash; | ||
|
||
server flask_1:5000; | ||
server flask_2:5000; | ||
} | ||
|
||
server { | ||
listen 443 ssl; | ||
server_name localhost; | ||
|
||
ssl_certificate /etc/nginx/ssl-certs/localhost.crt; | ||
ssl_certificate_key /etc/nginx/ssl-certs/localhost.key; | ||
|
||
location / { | ||
proxy_pass http://flask_nodes/; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
proxy_set_header X-Forwarded-Host $host; | ||
proxy_set_header X-Forwarded-Prefix /; | ||
} | ||
|
||
location /socket.io { | ||
proxy_pass http://flask_nodes/socket.io; | ||
proxy_http_version 1.1; | ||
proxy_buffering off; | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection "Upgrade"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters