From: "pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: sirgazil <sirgazil@zoho.com>, 26302 <26302@debbugs.gnu.org>
Subject: bug#26302: Deploying the i18n’d web site
Date: Thu, 9 Apr 2020 05:21:46 +0200 [thread overview]
Message-ID: <20200409032146.tm76qkrwwydfadye@pelzflorian.localdomain> (raw)
In-Reply-To: <20200407220225.zlw64sywakcajvkt@pelzflorian.localdomain>
[-- Attachment #1: Type: text/plain, Size: 638 bytes --]
On Wed, Apr 08, 2020 at 12:02:25AM +0200, pelzflorian (Florian Pelz) wrote:
> set_from_accept_language should better be a global directive I think.
>
No, I was wrong. set_from_accept_language must only appear once, but
not in a global directive. I put it in %extra-content for the
nginx-configuration now. It seems the attached patch works (after
removing the rottlog service), but I could not yet test building the
website i.e. if the redirects really work correctly. It is so slow.
Then again, better break the website before the release than after (if
it does not work). I cannot test tls and certbot anyway.
Regards,
Florian
[-- Attachment #2: deploy-i18n.patch --]
[-- Type: text/plain, Size: 4839 bytes --]
diff --git a/hydra/nginx/berlin.scm b/hydra/nginx/berlin.scm
index 303fd35..a57640e 100644
--- a/hydra/nginx/berlin.scm
+++ b/hydra/nginx/berlin.scm
@@ -461,20 +461,24 @@ PUBLISH-URL."
(body (list "alias /srv/guix.gnu.org-i18n;")))
(git-http-nginx-location-configuration
(git-http-configuration))
;; For Hurd bootstrap binaries.
(nginx-location-configuration
(uri "/guix")
(body (list "root /var/www;")))
+ (nginx-location-configuration
+ (uri "~ (.html|.htm)$")
+ (body (list "try_files /$lang/$uri $uri =404;")))
+
(nginx-location-configuration ;certbot
(uri "/.well-known")
(body (list "root /var/www;")))))
(define guix.info-locations
(list (nginx-location-configuration ;certbot
(uri "~ ^/\\.well-known")
(body (list "root /var/www;")))
(nginx-location-configuration
(uri "~ /(.*)")
@@ -507,31 +511,33 @@ PUBLISH-URL."
(list
"access_log /var/log/nginx/bootstrappable.access.log;")))
(nginx-server-configuration
(listen '("80"))
(server-name '("guix.gnu.org"))
(root "/srv/guix.gnu.org")
(locations guix.gnu.org-locations)
(raw-content
(list
+ "rewrite (.*)/$ $1/index.html;"
"access_log /var/log/nginx/guix-info.access.log;")))
(nginx-server-configuration
(listen '("80"))
(server-name '("guix.info"
"www.guix.info"))
(locations guix.info-locations)
(raw-content
(append
%tls-settings
(list
+ "rewrite (.*)/$ $1/index.html;"
"access_log /var/log/nginx/guix-info.https.access.log;"))))
(nginx-server-configuration
(listen '("80"))
(server-name '("issues.guix.info"
"issues.guix.gnu.org"))
(root "/home/rekado/mumi/")
(locations
(list (nginx-location-configuration ;certbot
(uri "/.well-known")
@@ -614,33 +620,35 @@ PUBLISH-URL."
(listen '("443 ssl"))
(server-name '("guix.info"
"www.guix.info"))
(ssl-certificate (le "guix.info"))
(ssl-certificate-key (le "guix.info" 'key))
(locations guix.info-locations)
(raw-content
(append
%tls-settings
(list
+ "rewrite (.*)/$ $1/index.html;"
"access_log /var/log/nginx/guix-info.https.access.log;"))))
(nginx-server-configuration
(listen '("443 ssl"))
(server-name '("guix.gnu.org"))
(ssl-certificate (le "guix.gnu.org"))
(ssl-certificate-key (le "guix.gnu.org" 'key))
(root "/srv/guix.gnu.org")
(locations guix.gnu.org-locations)
(raw-content
(append
%tls-settings
(list
+ "rewrite (.*)/$ $1/index.html;"
"access_log /var/log/nginx/guix-gnu-org.https.access.log;"))))
(nginx-server-configuration
(listen '("443 ssl"))
(server-name '("issues.guix.info"))
(ssl-certificate (le "issues.guix.info"))
(ssl-certificate-key (le "issues.guix.info" 'key))
(root "/home/rekado/mumi/")
(locations
(list (nginx-location-configuration
@@ -710,20 +718,22 @@ PUBLISH-URL."
"proxy_send_timeout 600;"
"proxy_read_timeout 600;"
"send_timeout 600;"
"access_log /var/log/nginx/workflows-guix-info.https.access.log;"))))))
(define %extra-content
(list
"default_type application/octet-stream;"
"sendfile on;"
+ "set_from_accept_language $lang en de;"
+
;; Maximum chunk size to send. Partly this is a workaround for
;; <http://bugs.gnu.org/19939>, but also the nginx docs mention that
;; "Without the limit, one fast connection may seize the worker
;; process entirely."
;; <http://nginx.org/en/docs/http/ngx_http_core_module#sendfile_max_chunk>
"sendfile_max_chunk 1m;"
"keepalive_timeout 65;"
;; Use HTTP 1.1 to talk to the backend so we benefit from keep-alive
@@ -768,20 +778,25 @@ PUBLISH-URL."
"proxy_connect_timeout 7s;"
"proxy_read_timeout 10s;"
"proxy_send_timeout 10s;"
;; Cache timeouts for a little while to avoid increasing pressure.
"proxy_cache_valid 504 30s;"))
(define %nginx-configuration
(nginx-configuration
(server-blocks %berlin-servers)
+ (modules
+ (list
+ ;; Module to redirect users to the localized pages of their choice.
+ (file-append nginx-accept-language-module
+ "/etc/nginx/modules/ngx_http_accept_language_module.so")))
(global-directives
;; This is a 72-core machine, but let's not use all of them for nginx.
'((worker_processes . 16)
(pcre_jit . on)
(events . ((worker_connections . 1024)))))
(extra-content
(string-join %extra-content "\n"))))
(define %zabbix-nginx-server
(nginx-server-configuration
next prev parent reply other threads:[~2020-04-09 3:22 UTC|newest]
Thread overview: 95+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-29 15:40 bug#26302: [website] translations ng0
2017-03-29 16:13 ` ng0
2017-04-15 12:00 ` ng0
2017-04-15 12:26 ` ng0
2017-07-31 21:11 ` Ludovic Courtès
2017-07-31 21:54 ` ng0
2019-09-06 14:25 ` pelzflorian (Florian Pelz)
2019-09-06 14:42 ` pelzflorian (Florian Pelz)
2019-09-08 19:44 ` Ludovic Courtès
2019-09-08 20:46 ` pelzflorian (Florian Pelz)
2019-09-18 13:57 ` Ludovic Courtès
2019-09-19 7:48 ` pelzflorian (Florian Pelz)
2019-09-19 11:42 ` bug#26302: Adding Florian as a committer Ludovic Courtès
2019-09-19 11:50 ` bug#26302: [website] translations Ludovic Courtès
2019-09-19 22:08 ` pelzflorian (Florian Pelz)
2019-10-22 12:10 ` Ludovic Courtès
2019-10-22 12:28 ` pelzflorian (Florian Pelz)
2019-10-22 12:41 ` pelzflorian (Florian Pelz)
2019-10-23 14:16 ` Ludovic Courtès
2019-10-23 14:41 ` pelzflorian (Florian Pelz)
2019-10-22 13:01 ` pelzflorian (Florian Pelz)
2019-10-31 20:19 ` pelzflorian (Florian Pelz)
2019-11-01 14:58 ` Ludovic Courtès
2019-09-06 18:17 ` sirgazil via Bug reports for GNU Guix
2019-09-08 17:16 ` pelzflorian (Florian Pelz)
2019-09-10 0:49 ` sirgazil via Bug reports for GNU Guix
2019-09-15 20:18 ` pelzflorian (Florian Pelz)
2019-09-18 13:00 ` pelzflorian (Florian Pelz)
2019-10-07 8:15 ` pelzflorian (Florian Pelz)
2019-10-08 9:37 ` pelzflorian (Florian Pelz)
2019-11-08 9:02 ` pelzflorian (Florian Pelz)
2019-11-08 14:01 ` sirgazil via Bug reports for GNU Guix
2019-11-08 16:18 ` pelzflorian (Florian Pelz)
2019-11-08 16:20 ` pelzflorian (Florian Pelz)
2019-11-08 17:13 ` pelzflorian (Florian Pelz)
2019-11-08 18:39 ` sirgazil via Bug reports for GNU Guix
2019-11-17 16:17 ` pelzflorian (Florian Pelz)
2019-12-02 8:57 ` pelzflorian (Florian Pelz)
2020-03-25 17:33 ` bug#26302: Deploying the i18n’d web site Ludovic Courtès
2020-03-25 23:21 ` pelzflorian (Florian Pelz)
2020-03-26 1:24 ` pelzflorian (Florian Pelz)
2020-04-07 21:18 ` Ludovic Courtès
2020-04-07 22:02 ` pelzflorian (Florian Pelz)
2020-04-09 3:21 ` pelzflorian (Florian Pelz) [this message]
2020-04-09 7:45 ` pelzflorian (Florian Pelz)
2020-04-09 14:57 ` pelzflorian (Florian Pelz)
2020-04-09 15:27 ` Ludovic Courtès
2020-04-09 17:31 ` pelzflorian (Florian Pelz)
2020-04-09 18:58 ` Bengt Richter
2020-04-09 19:17 ` pelzflorian (Florian Pelz)
2020-07-01 20:11 ` Christopher Baines
2020-07-05 9:08 ` pelzflorian (Florian Pelz)
2020-07-09 13:09 ` Ludovic Courtès
2020-07-09 14:48 ` pelzflorian (Florian Pelz)
2020-07-10 17:28 ` pelzflorian (Florian Pelz)
2020-07-12 6:26 ` pelzflorian (Florian Pelz)
2020-07-26 17:46 ` bug#26302: Multilingual web site is on-line! Ludovic Courtès
2020-07-26 18:57 ` pelzflorian (Florian Pelz)
2020-07-27 16:01 ` pelzflorian (Florian Pelz)
2020-07-28 21:50 ` Ludovic Courtès
2020-07-29 1:21 ` Julien Lepiller
2020-07-29 13:56 ` pelzflorian (Florian Pelz)
2020-08-03 14:53 ` Ludovic Courtès
2020-08-21 0:14 ` pelzflorian (Florian Pelz)
2020-08-21 0:41 ` Julien Lepiller
2020-08-21 7:51 ` pelzflorian (Florian Pelz)
2020-07-29 19:21 ` pelzflorian (Florian Pelz)
2020-07-31 14:45 ` Ludovic Courtès
2020-08-04 15:37 ` pelzflorian (Florian Pelz)
2020-08-23 15:55 ` Ludovic Courtès
2020-08-24 12:47 ` pelzflorian (Florian Pelz)
2020-08-24 14:05 ` Ludovic Courtès
2020-07-27 1:54 ` Dmitry Alexandrov
2020-07-27 11:28 ` pelzflorian (Florian Pelz)
2020-07-27 20:20 ` pelzflorian (Florian Pelz)
2020-07-09 16:56 ` bug#26302: Deploying the i18n’d web site Christopher Baines
2020-07-10 17:31 ` pelzflorian (Florian Pelz)
2020-07-13 13:22 ` Ludovic Courtès
2020-07-13 14:48 ` pelzflorian (Florian Pelz)
2020-07-13 16:32 ` pelzflorian (Florian Pelz)
2019-11-01 14:54 ` bug#26302: [website] translations Ludovic Courtès
2019-11-02 13:15 ` pelzflorian (Florian Pelz)
2019-11-04 17:19 ` Ludovic Courtès
2019-11-05 7:31 ` pelzflorian (Florian Pelz)
2019-11-05 11:11 ` pelzflorian (Florian Pelz)
2019-11-06 14:56 ` Ludovic Courtès
2019-11-06 18:30 ` pelzflorian (Florian Pelz)
2019-11-07 20:24 ` Ludovic Courtès
2019-11-06 14:49 ` Ludovic Courtès
2019-11-06 18:21 ` pelzflorian (Florian Pelz)
2020-07-26 17:52 ` Vagrant Cascadian
2020-07-27 11:20 ` pelzflorian (Florian Pelz)
2020-07-28 9:44 ` bug#26302: Fwd: website translation English (US)? pelzflorian (Florian Pelz)
2020-07-28 10:03 ` zimoun
2020-07-28 16:02 ` pelzflorian (Florian Pelz)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200409032146.tm76qkrwwydfadye@pelzflorian.localdomain \
--to=pelzflorian@pelzflorian.de \
--cc=26302@debbugs.gnu.org \
--cc=ludo@gnu.org \
--cc=sirgazil@zoho.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.