From 6b0d1bacd8d5eb255dc15e58fd49bf20e62ea4bd Mon Sep 17 00:00:00 2001 From: James Hodgkinson Date: Fri, 5 May 2023 21:08:54 +1000 Subject: [PATCH] =?UTF-8?q?Document=20that=20you=20need=20to=20tell=20Ngin?= =?UTF-8?q?x=20or=20other=20proxies=20to=20use=20HTTP=201.1=E2=80=A6=20(#1?= =?UTF-8?q?592)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Document that you need to tell Nginx or other proxies to use HTTP 1.1 or later - Fixes #1591 * fixing workflows --- .github/workflows/kanidm_book.yml | 11 +++++++++++ book/src/troubleshooting.md | 16 +++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/.github/workflows/kanidm_book.yml b/.github/workflows/kanidm_book.yml index 0db95a905..39ca2d127 100644 --- a/.github/workflows/kanidm_book.yml +++ b/.github/workflows/kanidm_book.yml @@ -3,6 +3,9 @@ name: GitHub Pages "on": push: + branches: + - "master" + pull_request: concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -67,3 +70,11 @@ jobs: ln -s ${{ needs.generate_tags.outputs.latest}}/ stable && \ cd .. ls -la docs/ + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + if: ${{ github.ref == 'refs/heads/master' }} + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./docs + destination_dir: ./docs diff --git a/book/src/troubleshooting.md b/book/src/troubleshooting.md index a770c9953..bbc94d817 100644 --- a/book/src/troubleshooting.md +++ b/book/src/troubleshooting.md @@ -67,6 +67,20 @@ related to the failing operation. Try running commands with `RUST_LOG=debug` to get more information: -``` +```shell RUST_LOG=debug kanidm login --name anonymous ``` + +## Reverse Proxies not sending HTTP/1.1 requests + +NGINX (and probably other proxies) send HTTP/1.0 requests to the upstream server by default. This'll lead to errors like this in your proxy logs: + +```text +*17 upstream prematurely closed connection while reading response header from upstream, client: 172.19.0.1, server: example.com, request: "GET / HTTP/1.1", upstream: "https://172.19.0.3:8443/", host: "example.com:8443" +``` + +The fix for NGINX is to set the [proxy_http_version](https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_http_version) to `1.1`. This can go in the same block as the `proxy_pass` option. + +```text +proxy_http_version 1.1 +```