Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- upstream xaggetweb {
- server localhost:30010;
- }
- upstream kibana {
- server localhost:5601;
- }
- upstream rabbitmq {
- server localhost:15672;
- }
- server {
- listen 80;
- location / {
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "upgrade";
- proxy_http_version 1.1;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header Host $host;
- proxy_pass http://xaggetweb;
- }
- location /rabbitmq/ {
- rewrite /rabbitmq/(.*) /$1 break;
- proxy_pass http://rabbitmq;
- proxy_redirect off;
- proxy_set_header Host $host;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- }
- # This will keep the refreshing of the page going
- location ~* /rabbitmq/(.*) {
- rewrite ^/rabbitmq/(.*)$ /$1 break;
- proxy_pass http://rabbitmq;
- }
- location /portainer/ {
- rewrite ^/portainer/(.*) /$1 break;
- proxy_pass http://localhost:9000;
- }
- location /kibana/ {
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $remote_addr;
- proxy_set_header Host $host;
- rewrite ^/kibana/(.*) /$1 break;
- proxy_pass http://kibana;
- }
- # the /app/kibana and /app/sense are harcoded. this is to prevent any problems with the xaggetweb in which the apps /apps/... might interfere with this
- location ~ (/app/kibana|/app/sense|/api/sense|/bundles/|/status|/plugins|/elasticsearch) {
- proxy_http_version 1.1;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "upgrade";
- proxy_set_header Host $host;
- proxy_pass http://kibana;
- rewrite ^/kibana/(.*) /$1 break;
- }
- location /assets {
- alias /data/kibanaImages;
- }
- # redirect server error pages to the static page /50x.html
- #
- error_page 500 502 503 504 /50x.html;
- location = /50x.html {
- root /usr/share/nginx/html;
- }
- }
- server {
- listen 213.224.176.108:9200;
- listen 192.168.186.10:9200;
- #listen 0.0.0.0:9200;
- server_name localhost-elastic;
- location / {
- proxy_pass http://localhost:9200;
- }
- # redirect server error pages to the static page /50x.html
- #
- error_page 500 502 503 504 /50x.html;
- location = /50x.html {
- root /usr/share/nginx/html;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement