nginx-default.conf.j2 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. server {
  2. listen 80 default_server;
  3. listen [::]:80 default_server;
  4. # ssl
  5. listen 443 ssl;
  6. listen [::]:443 ssl;
  7. ssl_certificate {{mapserver_ssl_cert_path}};
  8. ssl_certificate_key {{mapserver_ssl_key_path}};
  9. ssl_dhparam /etc/nginx/dhparams.pem;
  10. server_name _;
  11. root /var/www;
  12. index index.html;
  13. location = / {
  14. return 302 /meshviewer/;
  15. }
  16. location /meshviewer {
  17. alias {{meshviewer_install_directory}};
  18. try_files $uri $uri/ =404;
  19. gzip on;
  20. gzip_comp_level 2;
  21. gzip_types application/json application/javascript text/css;
  22. gzip_vary on;
  23. }
  24. location /meshviewer-test {
  25. alias /srv/meshviewer-test;
  26. try_files $uri $uri/ =404;
  27. gzip on;
  28. gzip_comp_level 2;
  29. gzip_types application/json application/javascript text/css;
  30. gzip_vary on;
  31. }
  32. location /grafana {
  33. if ($scheme != "https") {
  34. rewrite ^ https://map.ffdo.de$request_uri permanent;
  35. }
  36. include proxy_params;
  37. proxy_pass http://127.0.0.1:3000/;
  38. rewrite ^/grafana/(.*) /$1 break;
  39. proxy_set_header Host $host;
  40. }
  41. location /data {
  42. alias /srv/ffmap-data;
  43. gzip on;
  44. gzip_comp_level 2;
  45. gzip_types application/json;
  46. gzip_vary on;
  47. }
  48. # location /wiki {
  49. # if ($scheme = http){
  50. # rewrite ^ https://map.do.freifunk.ruhr$request_uri? permanent;
  51. # }
  52. # proxy_pass http://127.0.0.1:5001/;
  53. # proxy_set_header X-Real-IP $remote_addr;
  54. # proxy_redirect off;
  55. # }
  56. }