daily pastebin goal
46%
SHARE
TWEET

Untitled

a guest Apr 21st, 2016 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. I solved my previous problem connected to changing apache port to 8080, so that I could start nginx on 80-th port.
  2.  
  3. I set up a reversed proxy to create protected access to Kibana installed on server and available on localhost:5601
  4.  
  5. /etc/nginx/sites-available/default
  6.  
  7.     server {
  8.         listen 80;
  9.  
  10.         server_name mysite.com;
  11.  
  12.         auth_basic "Restricted Access";
  13.         auth_basic_user_file /etc/nginx/htpasswd.users;
  14.  
  15.         location / {
  16.             proxy_pass http://localhost:5601;
  17.             proxy_http_version 1.1;
  18.             proxy_set_header Upgrade $http_upgrade;
  19.             proxy_set_header Connection 'upgrade';
  20.             proxy_set_header Host $host;
  21.             proxy_cache_bypass $http_upgrade;        
  22.         }
  23.     }
  24.  
  25. Now I have another problem. I restrict access to all of my site by 'server_name mysite.com;'.
  26. mysite.com/kibana doesn't help me. What should I do?
RAW Paste Data
Top