nginx.conf 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. events { worker_connections 1024; }
  2. http {
  3. sendfile on;
  4. proxy_redirect off;
  5. proxy_set_header Host $host;
  6. proxy_set_header X-Real-IP $remote_addr;
  7. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  8. proxy_set_header X-Forwarded-Host $server_name;
  9. server {
  10. listen 10080;
  11. location /grafana/ {
  12. ################################################################
  13. # Enable these settings to test with basic auth and an auth proxy header
  14. # the htpasswd file contains an admin user with password admin and
  15. # user1: grafana and user2: grafana
  16. ################################################################
  17. # auth_basic "Restricted Content";
  18. # auth_basic_user_file /etc/nginx/htpasswd;
  19. ################################################################
  20. # To use the auth proxy header, set the following in custom.ini:
  21. # [auth.proxy]
  22. # enabled = true
  23. # header_name = X-WEBAUTH-USER
  24. # header_property = username
  25. ################################################################
  26. # proxy_set_header X-WEBAUTH-USER $remote_user;
  27. proxy_pass http://localhost:3000/;
  28. }
  29. }
  30. }