nginx.yml 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. nginx_sites:
  2. default:
  3. - listen 80 default_server
  4. - "listen [::]:80 default_server"
  5. - server_name _
  6. - listen 443 ssl
  7. - "listen [::]:443 ssl"
  8. - "ssl_certificate /etc/nginx/ssl/wiki.ffdo.de.crt"
  9. - "ssl_certificate_key /etc/nginx/ssl/wiki.ffdo.de.key"
  10. - "ssl_dhparam /etc/nginx/dhparams.pem"
  11. - "root /var/www"
  12. - index index.html
  13. - "location = / { return 302 /meshviewer/; }"
  14. - location /meshviewer {
  15. alias {{meshviewer_install_directory}};
  16. try_files $uri $uri/ =404;
  17. gzip on;
  18. gzip_comp_level 2;
  19. gzip_types application/json application/javascript text/css;
  20. gzip_vary on;
  21. }
  22. - location /data {
  23. proxy_pass http://127.0.0.1:8080;
  24. proxy_redirect off;
  25. gzip on;
  26. gzip_comp_level 2;
  27. gzip_types application/json;
  28. gzip_vary on;
  29. }
  30. - location /grafana {
  31. if ($scheme != "https") {
  32. rewrite ^ https://map.ffdo.de$request_uri permanent;
  33. }
  34. include proxy_params;
  35. proxy_pass http://127.0.0.1:3000/;
  36. rewrite ^/grafana/(.*) /$1 break;
  37. proxy_set_header Host $host;
  38. }