Upgrades Server to Allow Production Deployment #2
1 changed files with 51 additions and 0 deletions
51
config/nginx.conf
Normal file
51
config/nginx.conf
Normal file
|
@ -0,0 +1,51 @@
|
|||
worker_processes 1;
|
||||
daemon off;
|
||||
error_log /dev/stdout warn;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
accept_mutex off;
|
||||
}
|
||||
|
||||
http {
|
||||
|
||||
server {
|
||||
default_type application/json;
|
||||
listen 80;
|
||||
client_max_body_size 4G;
|
||||
server_name example;
|
||||
|
||||
location / {
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_redirect off;
|
||||
proxy_buffering off;
|
||||
|
||||
proxy_pass http://aiohttp;
|
||||
}
|
||||
}
|
||||
|
||||
# server {
|
||||
# listen 5921;
|
||||
# location /api {
|
||||
# proxy_set_header HOST $host;
|
||||
# proxy_set_header X-Forwarded-Proto $scheme;
|
||||
# proxy_set_header X-Real-IP $remote_addr;
|
||||
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
#
|
||||
# proxy_redirect off;
|
||||
# proxy_pass http://localhost:2903;
|
||||
#
|
||||
# }
|
||||
#}
|
||||
}
|
||||
|
||||
http {
|
||||
upstream aiohttp {
|
||||
server 127.0.0.1:5921 fail_timeout = 60;
|
||||
server 127.0.0.1:5922 fail_timeout = 60;
|
||||
server 127.0.0.1:5923 fail_timeout = 60;
|
||||
server 127.0.0.1:5924 fail_timeout = 60;
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue