1
0
Fork 0
mirror of https://github.com/overleaf/toolkit.git synced 2025-04-19 15:28:06 +02:00

Merge pull request #81 from YinAoXiong/patch-1

fix some port conflicts and misalignment issues
This commit is contained in:
Christopher Hoskin 2022-10-13 14:07:29 +01:00 committed by GitHub
commit 7d711752ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 6 deletions

View file

@ -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`.

View file

@ -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;

View file

@ -6,7 +6,7 @@ services:
image: "${NGINX_IMAGE}"
ports:
- "${NGINX_TLS_LISTEN_IP:-0.0.0.0}:${TLS_PORT:-443}:443"
- "${NGINX_HTTP_LISTEN_IP:-127.0.1.1}:${SHARELATEX_PORT:-80}:80"
- "${NGINX_HTTP_LISTEN_IP:-127.0.1.1}:${NGINX_HTTP_PORT:-80}:80"
volumes:
- "${TLS_PRIVATE_KEY_PATH}:/certs/nginx_key.pem:ro"
- "${TLS_CERTIFICATE_PATH}:/certs/nginx_certificate.pem:ro"
@ -14,4 +14,4 @@ services:
restart: always
container_name: nginx
depends_on:
- sharelatex
- sharelatex