Main repository for Devuan's www.devuan.org.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

81 lines
2.7 KiB

  1. # This is the main configuration for devuan.org
  2. # It's included in /etc/nginx/sites-available/devuan.org.conf
  3. # Old URLs
  4. rewrite ^/communicate.*$ /os/debian-fork permanent;
  5. # rewrite ^/releases.*$ https://files.devuan.org permanent;
  6. rewrite ^/os/releases/.*$ /os/releases permanent;
  7. # rewrite ^/os/releases/jessie.*$ https://files.devuan.org permanent;
  8. rewrite ^/donate.*$ /os/donate permanent;
  9. rewrite ^/files/devuan.mp3
  10. /os/download/media/devuan.mp3 permanent;
  11. rewrite ^/files/devuan.wav
  12. /os/download/media/devuan.wav permanent;
  13. rewrite ^/(Devuan_budget|devuan_financial_report_2014).pdf
  14. /os/download/report/devuan_budget_2014.pdf permanent;
  15. rewrite ^/devuan_financial_report_2015.pdf
  16. /os/download/report/devuan_financial_report_2015.pdf permanent;
  17. rewrite ^/newsletter_22dec.html
  18. /os/debian-fork/newsletter-12014-12-22 permanent;
  19. rewrite ^/pub.key /os/download/devuan-release-key.pub permanent;
  20. # Virtual /my Devuan
  21. location /my {
  22. set $gdo https://git.devuan.org;
  23. rewrite ^/my/dashboard $gdo/dashboard redirect;
  24. rewrite ^/my/milestones $gdo/dashboard/milestones redirect;
  25. rewrite ^/my/todo.* $gdo/dashboard/todos?state=pending redirect;
  26. set $tdo https://talk.devuan.org;
  27. rewrite ^/my/activity $tdo/my/activity redirect;
  28. rewrite ^/my/bookmarks $tdo/my/activity/bookmarks redirect;
  29. rewrite ^/my/messages $tdo/my/messages redirect;
  30. rewrite ^/my/preferences $tdo/my/preferences redirect;
  31. }
  32. # Robots
  33. location = /robots.txt {
  34. echo "User-agent: Twitterbot";
  35. echo "Disallow:";
  36. echo "";
  37. echo "User-agent: *";
  38. echo "Disallow: /index.html?";
  39. echo "Disallow: /?";
  40. echo "Disallow: /my";
  41. echo "Disallow: /os/download";
  42. echo "Allow: /os/download/media/devuan.mp3";
  43. echo "Allow: /os/download/media/devuan.wav";
  44. echo "Allow: /os/download/media/devuan_press_kit.zip";
  45. echo "Allow: /os/download/report/devuan_financial_report_2014.pdf";
  46. echo "Allow: /os/download/report/devuan_financial_report_2015.pdf";
  47. echo "Allow: /os/download/devuan_jessie_1.0.0_beta.torrent";
  48. echo "Allow: /os/download/devuan-trademark.pdf";
  49. echo "Disallow: /ui";
  50. echo "Allow: /ui/img/devuan-emblem.png";
  51. echo "Allow: /ui/img/devuan-emblem.svg";
  52. echo "Allow: /ui/img/devuan-logo.png";
  53. echo "Allow: /ui/img/devuan-logo-with-registered-trademark-sign.svg";
  54. echo "Sitemap: /os/sitemap.xml";
  55. }
  56. # Cache assets
  57. location ~* ^/ui/(css|img) {
  58. try_files $uri.gz $uri =404;
  59. expires +1y;
  60. }
  61. # Download (fixes #125)
  62. location ~ ^/os/download {
  63. try_files $uri @files;
  64. }
  65. # TODO: Lookup /etc for matching file and redirect to /os/etc/...
  66. # location @fs {}
  67. location @files {
  68. return 302 https://files.devuan.org/?ref=$uri;
  69. access_log /var/log/nginx/devuan.org_download_redirects.log;
  70. }