【Nginx】常用軟體代理設定
阿新 • • 發佈:2021-10-25
【Nginx】常用軟體代理設定
consul
location ~ ^/ui { auth_basic "Please input username and password!"; #這裡是驗證時的提示資訊 auth_basic_user_file /etc/nginx/passwd.db; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://localhost:8500; }
kibana
location /kibana/ { auth_basic "Please input username and password!"; #這裡是驗證時的提示資訊 auth_basic_user_file /etc/nginx/passwd.db; rewrite ^/kibabna/(.*)$ /$1 break; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host:$server_port; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_http_version 1.1; proxy_pass http://localhost:5601/; }
rabbitmq
location /rabbitmq/ { rewrite ^/rabbitmq/(.*)$ /$1 break; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host:$server_port; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_http_version1.1; proxy_pass http://localhost:15672/; }
nacos
location /nacos/ { #rewrite ^/nacos/(.*)$ /$1 break; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host:$server_port; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_http_version 1.1; proxy_pass http://localhost:8848/nacos/; }