nginx.conf 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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. # this url works only on mac
  28. proxy_pass http://host.docker.internal:3000/;
  29. }
  30. }
  31. }