28 lines
648 B
Text
28 lines
648 B
Text
# servers can be uncommented to add load balancing
|
|
upstream tetratto {
|
|
least_conn;
|
|
server localhost:4118;
|
|
# server localhost:5118;
|
|
}
|
|
|
|
server {
|
|
listen 80 default_server;
|
|
listen [::]:80 default_server;
|
|
|
|
server_name tetratto;
|
|
|
|
# main service stuff
|
|
location / {
|
|
proxy_pass http://tetratto;
|
|
proxy_pass_header CF-Connecting-IP;
|
|
proxy_pass_request_headers on;
|
|
}
|
|
|
|
# websocket forwarding stuff
|
|
location ~ /_connect/ {
|
|
proxy_pass http://tetratto;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
}
|
|
}
|