Skip to content

Instantly share code, notes, and snippets.

@Unbreathable
Last active September 20, 2024 12:11
Show Gist options
  • Save Unbreathable/0469cfd271b84340429c140dde830642 to your computer and use it in GitHub Desktop.
Save Unbreathable/0469cfd271b84340429c140dde830642 to your computer and use it in GitHub Desktop.
Liphium nginx templates
server {
server_name chat.liphium.com;
# Live share subscribe
location /liveshare/subscribe {
proxy_http_version 1.1;
proxy_connect_timeout 7d;
proxy_send_timeout 7d;
proxy_read_timeout 7d;
proxy_buffering off;
proxy_cache off;
proxy_set_header Connection "keep-alive";
chunked_transfer_encoding off;
proxy_pass http://localhost:4001/liveshare/subscribe;
}
# WebSocket endpoint
location /gateway {
proxy_http_version 1.1;
proxy_connect_timeout 7d;
proxy_send_timeout 7d;
proxy_read_timeout 7d;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://localhost:4001/gateway;
}
# Every other endpoint
location / {
proxy_pass http://localhost:4001;
}
}
server {
server_name main.liphium.com;
location /v1/account/files/upload {
client_max_body_size 10m;
proxy_pass http://localhost:4000;
}
location / {
proxy_pass http://localhost:4000;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment