From 3944150e6208666c85bf37d65cd1cb5a297fb2c3 Mon Sep 17 00:00:00 2001 From: Riccardo Spagni Date: Fri, 2 Jun 2017 13:35:51 +0200 Subject: [PATCH 1/6] add GUI to downloads page, add sample nginx config file --- _config/nginx.conf | 243 ++++++++++++++++++++++++++++++++++++++++++++ _data/downloads.yml | 26 +++-- downloads/index.md | 63 ++++++++---- 3 files changed, 305 insertions(+), 27 deletions(-) create mode 100644 _config/nginx.conf diff --git a/_config/nginx.conf b/_config/nginx.conf new file mode 100644 index 00000000..36e0dffd --- /dev/null +++ b/_config/nginx.conf @@ -0,0 +1,243 @@ +# This is included as an example of a config file that works for the site. This is important so that anyone can re-host it in the event of something going wrong with the main site. +# The main takeaways from this config file are the redirects, everything is relatively bog standard. + +server { + listen 80; + listen 443 ssl http2; + + ssl_certificate /etc/ssl/certs/ssl-cert-snakeoil.pem; + ssl_certificate_key /etc/ssl/private/ssl-cert-snakeoil.key; + + ssl_protocols TLSv1 TLSv1.1 TLSv1.2; + ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4"; + ssl_prefer_server_ciphers on; + + # Specify this vhost's domain name + server_name updates.getmonero.org downloads.getmonero.org downloads.monero.cc; + root /var/www/downloads.getmonero.org/webroot; + index index.php index.html index.htm; + + # Specify log locations for current site + access_log off; + error_log /var/log/nginx/default-site.log warn; + + # Let's not give away too much info: + error_page 403 = 404; + + # These are the restrictions I generally have on + # Disable logging for favicon + location = /favicon.ico { + log_not_found off; + access_log off; + } + + # Disable logging for robots.txt + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(ico|css|js|gif|jpe?g|png)$ + { + expires 31536000s; + access_log off; + log_not_found off; + add_header Pragma public; + add_header Cache-Control "max-age=31536000, public"; + } + + # Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac). + location ~ /\. { + deny all; + access_log off; + log_not_found off; + } + # End of general restrictions + + # Downloads! + location /win64 { + rewrite ^ /cli/monero-win-x64-v0.10.3.1.zip redirect; + } + + location /win32 { + rewrite ^ /cli/monero-win-x86-v0.10.3.1.zip redirect; + } + + location /mac64 { + rewrite ^ /cli/monero-mac-x64-v0.10.3.1.tar.bz2 redirect; + } + + location /linux64 { + rewrite ^ /cli/monero-linux-x64-v0.10.3.1.tar.bz2 redirect; + } + + location /linux32 { + rewrite ^ /cli/monero-linux-x86-v0.10.3.1.tar.bz2 redirect; + } + + location /linuxarm7 { + rewrite ^ /cli/monero-linux-armv7-v0.10.3.1.tar.bz2 redirect; + } + + location /linuxarm8 { + rewrite ^ /cli/monero-linux-armv8-v0.10.3.1.tar.bz2 redirect; + } + + location /freebsd64 { + rewrite ^ /cli/monero-freebsd-x64-v0.10.3.1.tar.bz2 redirect; + } + + location /dragonflybsd64 { + rewrite ^ /cli/monero-dragonflybsd-x64-v0.10.3.1.tar.bz2 redirect; + } + + # GUI downloads + location /gui/win64 { + rewrite ^ /gui/monero-win-x64-v0.10.3.1.zip redirect; + } + + location /gui/mac64 { + rewrite ^ /gui/monero-mac-x64-v0.10.3.1.tar.bz2 redirect; + } + + location /gui/linux64 { + rewrite ^ /gui/monero-linux-x64-v0.10.3.1.tar.bz2 redirect; + } + + location /gui/inux32 { + rewrite ^ /gui/monero-linux-x86-v0.10.3.1.tar.bz2 redirect; + } + + # Other download redirects + location /cli/win64 { + rewrite ^ /win64 permanent; + } + + location /cli/win32 { + rewrite ^ /win32 permanent; + } + + location /cli/mac64 { + rewrite ^ /mac64 permanent; + } + + location /cli/linux64 { + rewrite ^ /linux64 permanent; + } + + location /cli/linux32 { + rewrite ^ /linux32 permanent; + } + + location /cli/linuxarm7 { + rewrite ^ /linuxarm7 permanent; + } + + location /cli/linuxarm8 { + rewrite ^ /linuxarm8 permanent; + } + + location /cli/freebsd64 { + rewrite ^ /freebsd64 permanent; + } + + location /cli/dragonflybsd64 { + rewrite ^ /dragonflybsd64 permanent; + } + + location /win { + rewrite ^ /win64 permanent; + } + + location /mac { + rewrite ^ /mac64 permanent; + } + + location /linux { + rewrite ^ /linux64 permanent; + } + + location /freebsd { + rewrite ^ /freebsd64 permanent; + } + + location /dragonflybsd { + rewrite ^ /dragonflybsd64 permanent; + } + + location /arm { + rewrite ^ /linuxarm7 permanent; + } + + location /arm64 { + rewrite ^ /linuxarm8 permanent; + } + + location /arm7 { + rewrite ^ /linuxarm7 permanent; + } + + location /arm8 { + rewrite ^ /linuxarm8 permanent; + } + + location /monero.win.x64.latest.zip { + rewrite ^ /win64 permanent; + } + + location /monero.win.x32.latest.zip { + rewrite ^ /win32 permanent; + } + + location /monero.mac.x64.latest.tar.bz2 { + rewrite ^ /mac64 permanent; + } + + location /monero.linux.x64.latest.tar.bz2 { + rewrite ^ /linux64 permanent; + } + + location /monero.linux.x86.latest.tar.bz2 { + rewrite ^ /linux86 permanent; + } + + location /monero.linux.arm7.latest.tar.bz2 { + rewrite ^ /linuxarm7 permanent; + } + + location /monero.linux.arm8.latest.tar.bz2 { + rewrite ^ /linuxarm8 permanent; + } + + location /monero.freebsd.x64.latest.tar.bz2 { + rewrite ^ /freebsd64 permanent; + } + + location /monero.dragonflybsd.x64.latest.tar.bz2 { + rewrite ^ /dragonflybsd64 permanent; + } + + location / { + try_files $uri $uri/ $uri.php $uri.htm $uri.html =404; + index index.html index.htm index.php; + } + + # Block for processing PHP files + # Specifically matches URIs ending in .php + location ~ \.php$ { + try_files $uri =404; + + # Fix for server variables that behave differently under nginx/php-fpm than typically expected + fastcgi_split_path_info ^(.+\.php)(/.+)$; + # Include the standard fastcgi_params file included with nginx + include fastcgi_params; + fastcgi_param PATH_INFO $fastcgi_path_info; + fastcgi_index index.php; + # Override the SCRIPT_FILENAME variable set by fastcgi_params + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + # Pass to upstream PHP-FPM; This must match whatever you name your upstream connection + fastcgi_pass phpfpm; + } + +} \ No newline at end of file diff --git a/_data/downloads.yml b/_data/downloads.yml index 07358175..89743355 100644 --- a/_data/downloads.yml +++ b/_data/downloads.yml @@ -1,7 +1,9 @@ - platform: Windows, 64-bit icon: windows.svg cli_url: win64 - hash: 2fbda6f6b1051053703e40cf77b6c6e11334509ad03a3c22d89b6bcb05615910 + cli_hash: 2fbda6f6b1051053703e40cf77b6c6e11334509ad03a3c22d89b6bcb05615910 + gui_url: win64 + gui_hash: 0eddd423f5f0df236303d8b9225842142b331093eb69e6183f3f694238c371a7 version: 0.10.3.1 tag: Wolfram Warptangent blockchain: win @@ -9,7 +11,7 @@ - platform: Windows, 32-bit icon: windows.svg cli_url: win32 - hash: da628a45adfcb8be44df06ac904711d644d608c4eb6479a5d256062a5f6d74de + cli_hash: da628a45adfcb8be44df06ac904711d644d608c4eb6479a5d256062a5f6d74de version: 0.10.3.1 tag: Wolfram Warptangent blockchain: win @@ -17,7 +19,9 @@ - platform: Mac OS X, 64-bit icon: apple.svg cli_url: mac64 - hash: fd17d55a8c9e901ff4064c39d9e14786cdd077aff9b3bb556e60d3a5e322050c + cli_hash: fd17d55a8c9e901ff4064c39d9e14786cdd077aff9b3bb556e60d3a5e322050c + gui_url: mac64 + gui_hash: c80ca68037158216a080e59e90b0a70761cff2f317d3c9cd0eeb661e8e2a1f99 version: 0.10.3.1 tag: Wolfram Warptangent blockchain: mac @@ -25,7 +29,9 @@ - platform: Linux, 64-bit icon: linux.svg cli_url: linux64 - hash: 8db80f8cc4f80d4106db807432828df730a59eac78972ea81652aa6b9bac04ad + cli_hash: 8db80f8cc4f80d4106db807432828df730a59eac78972ea81652aa6b9bac04ad + gui_url: linux64 + gui_hash: 4915473265d58720fd8f019e536c2b7fb02648ab51a8087e84aa1e2434788452 version: 0.10.3.1 tag: Wolfram Warptangent blockchain: linux @@ -33,7 +39,9 @@ - platform: Linux, 32-bit icon: linux.svg cli_url: linux32 - hash: abc99f3928f4083bd1a380a869253e07bee9950e0aeb6388e9493bc0f0ec3f53 + cli_hash: abc99f3928f4083bd1a380a869253e07bee9950e0aeb6388e9493bc0f0ec3f53 + gui_url: linux32 + gui_hash: 092b49080c3380666845f7f39823b09f4960ea1e250b84b150856ef33ca30690 version: 0.10.3.1 tag: Wolfram Warptangent blockchain: linux @@ -41,7 +49,7 @@ - platform: ARMv7 icon: arm.svg cli_url: linuxarm7 - hash: 8473fa20e0db4a3d3e46120cdf92c55be6a159478c511e21f7b77aa05d6c1910 + cli_hash: 8473fa20e0db4a3d3e46120cdf92c55be6a159478c511e21f7b77aa05d6c1910 version: 0.10.3.1 tag: Wolfram Warptangent blockchain: arm @@ -49,7 +57,7 @@ - platform: ARMv8 icon: arm.svg cli_url: linuxarm8 - hash: 451f65e4846b92d54859e22a5d92124557b397b4208d8752d5289d0262573c3c + cli_hash: 451f65e4846b92d54859e22a5d92124557b397b4208d8752d5289d0262573c3c version: 0.10.3.1 tag: Wolfram Warptangent blockchain: arm @@ -57,7 +65,7 @@ - platform: FreeBSD, 64-bit icon: freebsd.svg cli_url: freebsd64 - hash: 4c66a76752e18ae70b5fb1c728f0d2780eb129a6c8c7d0dee7ba02e05d91efae + cli_hash: 4c66a76752e18ae70b5fb1c728f0d2780eb129a6c8c7d0dee7ba02e05d91efae version: 0.10.3.1 tag: Wolfram Warptangent blockchain: freebsd @@ -65,5 +73,5 @@ - platform: Source Code icon: github.svg cli_url: https://github.com/monero-project/bitmonero - hash: source + cli_hash: source version: Bleeding edge (possibly unstable) \ No newline at end of file diff --git a/downloads/index.md b/downloads/index.md index f793a7e2..4874dd53 100644 --- a/downloads/index.md +++ b/downloads/index.md @@ -21,7 +21,7 @@ Note: the SHA256 hashes are listed by the downloads for convenience, but a GPG-s {% for data_downloads in site.data.downloads %} -{% if data_downloads.hash == "source" %} +{% if data_downloads.cli_hash == "source" %}
@@ -36,32 +36,59 @@ Note: the SHA256 hashes are listed by the downloads for convenience, but a GPG-s
-{% elsif data_downloads.hash == "none" %} - -
- -

- {{ data_downloads.platform }} -

- -
-Coming Soon
-
- -
- -{% else %} +{% elsif data_downloads.gui_hash == nil and data_downloads.cli_hash != nil %}

- {{ data_downloads.platform }} + {{ data_downloads.platform }} (Command-line Tools Only)

Current Version: {{ data_downloads.version }} {{ data_downloads.tag }}
-SHA256 Hash: {{ data_downloads.hash }}
+SHA256 Hash: {{ data_downloads.cli_hash }}
+
+ +
+ +{% elsif data_downloads.gui_hash != nil and data_downloads.cli_hash == nil %} + +
+ +

+ + {{ data_downloads.platform }} (Beta 2) + +

+ +Current Version: {{ data_downloads.version }} {{ data_downloads.tag }}
+SHA256 Hash: {{ data_downloads.gui_hash }}
+
+ +
+ +{% elsif data_downloads.gui_hash != nil and data_downloads.cli_hash != nil %} + +
+ +

+ + {{ data_downloads.platform }} (Beta 2) + +

+ +

+ + {{ data_downloads.platform }} (Command-Line Tools Only) + +

+ +Current Version: {{ data_downloads.version }} {{ data_downloads.tag }}
+SHA256 Hash (GUI): {{ data_downloads.gui_hash }}
+SHA256 Hash (CLI): {{ data_downloads.cli_hash }}
+ +
From 75ed47bc61a4753295858b9a38200acaaf7c2b16 Mon Sep 17 00:00:00 2001 From: Riccardo Spagni Date: Fri, 2 Jun 2017 13:38:16 +0200 Subject: [PATCH 2/6] add spacing to downloads page --- downloads/index.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/downloads/index.md b/downloads/index.md index 4874dd53..17eb0c46 100644 --- a/downloads/index.md +++ b/downloads/index.md @@ -29,9 +29,11 @@ Note: the SHA256 hashes are listed by the downloads for convenience, but a GPG-s {{ data_downloads.platform }} +

Current Version: {{ data_downloads.version }} {{ data_downloads.tag }}
+

@@ -44,10 +46,12 @@ Note: the SHA256 hashes are listed by the downloads for convenience, but a GPG-s {{ data_downloads.platform }} (Command-line Tools Only) +

Current Version: {{ data_downloads.version }} {{ data_downloads.tag }}
SHA256 Hash: {{ data_downloads.cli_hash }}
+

@@ -60,10 +64,12 @@ Note: the SHA256 hashes are listed by the downloads for convenience, but a GPG-s {{ data_downloads.platform }} (Beta 2) +

Current Version: {{ data_downloads.version }} {{ data_downloads.tag }}
SHA256 Hash: {{ data_downloads.gui_hash }}
+

From 6c843196f990b338810473b67ff84a0ae856f337 Mon Sep 17 00:00:00 2001 From: Riccardo Spagni Date: Fri, 2 Jun 2017 13:47:05 +0200 Subject: [PATCH 3/6] add blank platform icons where necessary --- downloads/index.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/downloads/index.md b/downloads/index.md index 17eb0c46..d437b1db 100644 --- a/downloads/index.md +++ b/downloads/index.md @@ -29,7 +29,7 @@ Note: the SHA256 hashes are listed by the downloads for convenience, but a GPG-s {{ data_downloads.platform }} -

+
Current Version: {{ data_downloads.version }} {{ data_downloads.tag }}
@@ -46,7 +46,7 @@ Note: the SHA256 hashes are listed by the downloads for convenience, but a GPG-s {{ data_downloads.platform }} (Command-line Tools Only) -

+
Current Version: {{ data_downloads.version }} {{ data_downloads.tag }}
@@ -64,7 +64,7 @@ Note: the SHA256 hashes are listed by the downloads for convenience, but a GPG-s {{ data_downloads.platform }} (Beta 2) -

+
Current Version: {{ data_downloads.version }} {{ data_downloads.tag }}
From 5c3bc97ebef22ff3d1e69ff2f630b96cfbb7ac54 Mon Sep 17 00:00:00 2001 From: Riccardo Spagni Date: Fri, 2 Jun 2017 13:50:39 +0200 Subject: [PATCH 4/6] remove slugify on CLI+GUI platforms --- downloads/index.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/downloads/index.md b/downloads/index.md index d437b1db..ed8f5fa2 100644 --- a/downloads/index.md +++ b/downloads/index.md @@ -29,7 +29,11 @@ Note: the SHA256 hashes are listed by the downloads for convenience, but a GPG-s {{ data_downloads.platform }} -
+ + + +

+

Current Version: {{ data_downloads.version }} {{ data_downloads.tag }}
@@ -46,7 +50,10 @@ Note: the SHA256 hashes are listed by the downloads for convenience, but a GPG-s {{ data_downloads.platform }} (Command-line Tools Only) -
+ + +

+

Current Version: {{ data_downloads.version }} {{ data_downloads.tag }}
@@ -64,7 +71,10 @@ Note: the SHA256 hashes are listed by the downloads for convenience, but a GPG-s {{ data_downloads.platform }} (Beta 2) -
+ + +

+

Current Version: {{ data_downloads.version }} {{ data_downloads.tag }}
@@ -84,7 +94,7 @@ Note: the SHA256 hashes are listed by the downloads for convenience, but a GPG-s -

+

{{ data_downloads.platform }} (Command-Line Tools Only) From 8d91bbde0b6a01059c84c805bd58e98822ca7650 Mon Sep 17 00:00:00 2001 From: Riccardo Spagni Date: Fri, 2 Jun 2017 13:54:54 +0200 Subject: [PATCH 5/6] extra line spacing for wide screens --- downloads/index.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/downloads/index.md b/downloads/index.md index ed8f5fa2..b64d77fa 100644 --- a/downloads/index.md +++ b/downloads/index.md @@ -37,7 +37,7 @@ Note: the SHA256 hashes are listed by the downloads for convenience, but a GPG-s

Current Version: {{ data_downloads.version }} {{ data_downloads.tag }}
-
+


@@ -58,7 +58,7 @@ Note: the SHA256 hashes are listed by the downloads for convenience, but a GPG-s Current Version: {{ data_downloads.version }} {{ data_downloads.tag }}
SHA256 Hash: {{ data_downloads.cli_hash }}
-
+


@@ -79,7 +79,7 @@ Note: the SHA256 hashes are listed by the downloads for convenience, but a GPG-s Current Version: {{ data_downloads.version }} {{ data_downloads.tag }}
SHA256 Hash: {{ data_downloads.gui_hash }}
-
+


From a6bbb5ebbb94c47595a7284ad270f8fefd3c4228 Mon Sep 17 00:00:00 2001 From: Riccardo Spagni Date: Fri, 2 Jun 2017 13:56:04 +0200 Subject: [PATCH 6/6] add GUI to beta 2 note --- downloads/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/downloads/index.md b/downloads/index.md index b64d77fa..715b7f51 100644 --- a/downloads/index.md +++ b/downloads/index.md @@ -69,7 +69,7 @@ Note: the SHA256 hashes are listed by the downloads for convenience, but a GPG-s

- {{ data_downloads.platform }} (Beta 2) + {{ data_downloads.platform }} (GUI Beta 2)

@@ -90,7 +90,7 @@ Note: the SHA256 hashes are listed by the downloads for convenience, but a GPG-s

- {{ data_downloads.platform }} (Beta 2) + {{ data_downloads.platform }} (GUI Beta 2)