From 3a40892b9c1d2fdbc2aa91b08101374bb7b9717f Mon Sep 17 00:00:00 2001 From: Christopher Hoskin Date: Thu, 13 Oct 2022 12:17:37 +0100 Subject: [PATCH] SHARELATEX_PORT doesn't configure port in container --- doc/overleaf-rc.md | 2 -- doc/tls-proxy.md | 3 --- lib/config-seed/nginx.conf | 2 +- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/doc/overleaf-rc.md b/doc/overleaf-rc.md index cc3cccd..33bb3d5 100644 --- a/doc/overleaf-rc.md +++ b/doc/overleaf-rc.md @@ -36,8 +36,6 @@ Setting `SHARELATEX_LISTEN_IP` to either `0.0.0.0` or the external IP of your ho Sets the host port that the container will bind to. For example, if this is set to `8099` and `SHARELATEX_LISTEN_IP` is set to `127.0.0.1`, then the web interface will be available on `http://localhost:8099`. -When used in conjunction with the [TLS Proxy](tls-proxy.md), the `proxy_pass` port in [nginx.conf](config/nginx/nginx.conf) also needs to be changed. - - Default: 80 diff --git a/doc/tls-proxy.md b/doc/tls-proxy.md index bf45eaa..2ac17f0 100644 --- a/doc/tls-proxy.md +++ b/doc/tls-proxy.md @@ -27,9 +27,6 @@ TLS_PORT=443 ``` In order to run the proxy, change the value of the `NGINX_ENABLED` variable in `config/overleaf.rc` from `false` to `true` and re-run `bin/up`. - -When the [SHARELATEX_PORT](overleaf-rc.md#sharelatex_port) variable is set, the port in the `proxy_pass` statement in `nginx.conf` needs to be changed to match. - By default the https web interface will be available on `https://127.0.1.1:443`. Connections to `http://127.0.1.1:80` will be redirected to `https://127.0.1.1:443`. To change the IP address that NGINX listens on, set the `NGINX_HTTP_LISTEN_IP` and `NGINX_TLS_LISTEN_IP` variables. The ports can be changed via the `NGINX_HTTP_PORT` and `TLS_PORT` variables. If NGINX fails to start with the error message `Error starting userland proxy: listen tcp4 ... bind: address already in use` ensure that `SHARELATEX_LISTEN_IP:SHARELATEX_PORT` does not overlap with `NGINX_HTTP_LISTEN_IP:NGINX_HTTP_PORT`. diff --git a/lib/config-seed/nginx.conf b/lib/config-seed/nginx.conf index 444f6bb..31fa349 100644 --- a/lib/config-seed/nginx.conf +++ b/lib/config-seed/nginx.conf @@ -30,7 +30,7 @@ http { client_max_body_size 50M; location / { - proxy_pass http://sharelatex:80; # The port must match the value of SHARELATEX_PORT. + proxy_pass http://sharelatex:80; proxy_set_header X-Forwarded-Proto $scheme; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade;