51 lines
1.1 KiB
Nginx Configuration File
51 lines
1.1 KiB
Nginx Configuration File
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;
|
|
|
|
}
|
|
}
|