Advertisement
Guest User

Untitled

a guest
Dec 5th, 2016
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.43 KB | None | 0 0
  1. upstream xaggetweb {
  2. server localhost:30010;
  3. }
  4.  
  5. upstream kibana {
  6. server localhost:5601;
  7. }
  8.  
  9. upstream rabbitmq {
  10. server localhost:15672;
  11. }
  12.  
  13. server {
  14. listen 80;
  15. location / {
  16. proxy_set_header Upgrade $http_upgrade;
  17. proxy_set_header Connection "upgrade";
  18. proxy_http_version 1.1;
  19. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  20. proxy_set_header Host $host;
  21. proxy_pass http://xaggetweb;
  22. }
  23.  
  24. location /rabbitmq/ {
  25. rewrite /rabbitmq/(.*) /$1 break;
  26. proxy_pass http://rabbitmq;
  27. proxy_redirect off;
  28. proxy_set_header Host $host;
  29. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  30. }
  31.  
  32. # This will keep the refreshing of the page going
  33. location ~* /rabbitmq/(.*) {
  34. rewrite ^/rabbitmq/(.*)$ /$1 break;
  35. proxy_pass http://rabbitmq;
  36. }
  37.  
  38. location /portainer/ {
  39. rewrite ^/portainer/(.*) /$1 break;
  40. proxy_pass http://localhost:9000;
  41. }
  42.  
  43. location /kibana/ {
  44. proxy_set_header X-Real-IP $remote_addr;
  45. proxy_set_header X-Forwarded-For $remote_addr;
  46. proxy_set_header Host $host;
  47. rewrite ^/kibana/(.*) /$1 break;
  48. proxy_pass http://kibana;
  49. }
  50.  
  51. # 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
  52. location ~ (/app/kibana|/app/sense|/api/sense|/bundles/|/status|/plugins|/elasticsearch) {
  53. proxy_http_version 1.1;
  54. proxy_set_header Upgrade $http_upgrade;
  55. proxy_set_header Connection "upgrade";
  56. proxy_set_header Host $host;
  57. proxy_pass http://kibana;
  58. rewrite ^/kibana/(.*) /$1 break;
  59. }
  60.  
  61. location /assets {
  62. alias /data/kibanaImages;
  63. }
  64.  
  65. # redirect server error pages to the static page /50x.html
  66. #
  67. error_page 500 502 503 504 /50x.html;
  68. location = /50x.html {
  69. root /usr/share/nginx/html;
  70. }
  71. }
  72.  
  73. server {
  74. listen 213.224.176.108:9200;
  75. listen 192.168.186.10:9200;
  76. #listen 0.0.0.0:9200;
  77. server_name localhost-elastic;
  78.  
  79. location / {
  80. proxy_pass http://localhost:9200;
  81. }
  82.  
  83. # redirect server error pages to the static page /50x.html
  84. #
  85. error_page 500 502 503 504 /50x.html;
  86. location = /50x.html {
  87. root /usr/share/nginx/html;
  88. }
  89. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement