Adds nginx config

This commit is contained in:
Oleg Silkin 2019-07-24 02:12:22 -04:00
parent e14c94121b
commit fda41a6b97

51
config/nginx.conf Normal file
View 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;
}
}