Firebird/FAQs
From stonehomewiki
Misc
How do I config nginx if I put rabbitmq behind it?
rabbitmq has a management Web Console. If you put it behind a nginx proxy, you can refer to notes her: Management Plugin
Here is my example, my backend rabbitmq Web UI is at http://10.2.10.152:80/, it is actually a k8s service, and I want to mount it under /streaming/rabbitmq, so my config is
I have another HTTPS enabled load balancer in front of this, so this nginx is not directly exposed to client.
(oci-cli) [opc@beta-k8s-admin ~]$ k get services NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE rabbitmq LoadBalancer 10.96.103.207 10.2.10.152 5672:30861/TCP,80:31434/TCP 3d
server {
listen 100.73.58.196:8001;
server_name _;
location ~* /streaming/rabbitmq/api/(.*?)/(.*) {
proxy_pass http://10.2.10.152:80/api/$1/%2F/$2?$query_string;
proxy_http_version 1.1;
proxy_cache_bypass $http_upgrade;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
}
location ~* /streaming/rabbitmq/(.*) {
rewrite ^/streaming/rabbitmq/(.*)$ /$1 break;
proxy_pass http://10.2.10.152:80;
proxy_http_version 1.1;
proxy_cache_bypass $http_upgrade;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
}
Retrieved from "https://home.stonezhong.net/index.php?title=Firebird/FAQs&oldid=344"