Advertisement
Guest User

Untitled

a guest
Aug 8th, 2019
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 1.00 KB | None | 0 0
  1. # make sure that your dns has a cname set for grafana and that your grafana container is not using a base url
  2. server {
  3.     listen 80;
  4.     server_name grafana.*;
  5.     return 301 https://$server_name$request_uri;
  6. }
  7.  
  8. server {
  9.     listen 443 ssl;
  10.     listen [::]:443 ssl;
  11.  
  12.     server_name grafana.*;
  13.  
  14.     include /config/nginx/ssl.conf;
  15.  
  16.     client_max_body_size 0;
  17.         add_header X-Frame-Options "";
  18.  
  19.     # enable for ldap auth, fill in ldap details in ldap.conf
  20.     #include /config/nginx/ldap.conf;
  21.  
  22.     location / {
  23.         # enable the next two lines for http auth
  24.         #auth_basic "Restricted";
  25.         #auth_basic_user_file /config/nginx/.htpasswd;
  26.  
  27.         # enable the next two lines for ldap auth
  28.         #auth_request /auth;
  29.         #error_page 401 =200 /login;
  30.                 proxy_hide_header X-Frame-Options;
  31.         include /config/nginx/proxy.conf;
  32.         resolver 127.0.0.11 valid=30s;
  33.         set $upstream_grafana 192.168.1.125;
  34.         proxy_pass http://$upstream_grafana:3000;
  35.     }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement