firmware.in.ffho.net 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #
  2. # /etc/nginx/sites-enabled/firmware.in.ffho.net (Salt managed)
  3. #
  4. server {
  5. listen 80;
  6. listen [::]:80;
  7. root {{salt['pillar.get']('nodes:' ~ grains['id'] ~ ':path:firmware', [])}};
  8. server_name ~^firmware\.(srv\.)?in\.ffho\.net$;
  9. fancyindex on;
  10. fancyindex_exact_size off;
  11. fancyindex_name_length 70;
  12. fancyindex_header /header.html;
  13. fancyindex_localtime on;
  14. fancyindex_default_sort name;
  15. location / {
  16. try_files $uri $uri/ /index.html =404;
  17. fancyindex_ignore header.html favicon.ico models-short.txt models.txt robots.txt scripts;
  18. }
  19. location ~ /\. {
  20. deny all;
  21. }
  22. location /scripts {
  23. deny all;
  24. }
  25. location ~ ^/(?<site_code>(ffho(_(\w\w\w))?(_(cty|uml))?))/(stable|testing|experimental)/sysupgrade/((?<branch>(stable|testing|experimental))\.manifest)$ {
  26. try_files $uri /$branch/sysupgrade/$branch.$site_code.manifest /$branch/sysupgrade/$branch.manifest;
  27. }
  28. location ~ ^/(?<site_code>(ffho(_(\w\w\w))?(_(cty|uml))?))/(?<branch>(stable|testing|experimental))/sysupgrade/(?<file>.*) {
  29. try_files $uri /$branch/sysupgrade/$file /stable/sysupgrade/$file /testing/sysupgrade/$file /experimental/sysupgrade/$file;
  30. }
  31. # opkg mirror
  32. location ~^/openwrt/(?<file>.+)$ {
  33. return 302 http://ftp.stw-bonn.de/pub/openwrt/$file;
  34. }
  35. # autoupdater legacy glue
  36. location ~ ^/(?<site_code>(ffho(_(\w\w\w))?(_(cty|uml))?))/(?<branch>(stable|testing|experimental))/($branch\.manifest)$ {
  37. try_files $uri /$branch/sysupgrade/$branch.$site_code.manifest /$branch/sysupgrade/$branch.manifest =404;
  38. }
  39. location ~ ^/(?<site_code>(ffho(_(\w\w\w))?(_(cty|uml))?))/(?<branch>(stable|testing|experimental))/(?<file>.*) {
  40. try_files $uri /$branch/sysupgrade/$file =404;
  41. }
  42. location ~ ^/(?<branch>(stable|testing|experimental))/(?<file>.*)$ {
  43. try_files $uri $uri/ /$branch/sysupgrade/$file =404;
  44. }
  45. }