mirror of
https://github.com/MUnique/OpenMU
synced 2026-08-15 14:32:19 -04:00
65 lines
No EOL
1.5 KiB
Text
65 lines
No EOL
1.5 KiB
Text
events {
|
|
}
|
|
|
|
http {
|
|
# this is required to proxy Grafana Live WebSocket connections.
|
|
map $http_upgrade $connection_upgrade {
|
|
default upgrade;
|
|
'' close;
|
|
}
|
|
|
|
server {
|
|
auth_basic "Protected Site";
|
|
auth_basic_user_file /etc/nginx/.htpasswd;
|
|
|
|
listen 80;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
|
|
resolver 127.0.0.11 ipv6=off;
|
|
|
|
location /zipkin {
|
|
proxy_pass http://zipkin:9411/zipkin/;
|
|
}
|
|
|
|
location /grafana/ {
|
|
proxy_set_header Host $http_host;
|
|
proxy_pass http://grafana:3000/;
|
|
|
|
# Auth by nginx
|
|
proxy_set_header X-WEBAUTH-USER $remote_user;
|
|
proxy_set_header Authorization "";
|
|
}
|
|
|
|
# Proxy Grafana Live WebSocket connections.
|
|
location /grafana/api/live {
|
|
rewrite ^/grafana/(.*) /$1 break;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $connection_upgrade;
|
|
proxy_set_header Host $http_host;
|
|
|
|
proxy_pass http://grafana:3000/;
|
|
|
|
# Auth by nginx
|
|
proxy_set_header X-WEBAUTH-USER $remote_user;
|
|
proxy_set_header Authorization "";
|
|
}
|
|
|
|
location ~ (/admin)(.*) {
|
|
proxy_pass http://adminPanel:8080/admin$2;
|
|
}
|
|
|
|
# Public API
|
|
location ~ (/serverInfo)(.*) {
|
|
proxy_pass http://connectServer:8080/serverInfo$2;
|
|
auth_basic off;
|
|
}
|
|
|
|
# Game Servers:
|
|
location ~ (/gameServer/(\d+)(.*)) {
|
|
proxy_pass http://gameServer$2:8080$1;
|
|
}
|
|
}
|
|
} |