wallabag / docker

Official docker-composer for wallabag.
592 stars 150 forks source link

wallabag behind NGINX reverse proxy stops working with the latest image #334

Closed 4Syno closed 1 year ago

4Syno commented 1 year ago

I have an active wallabag 2.5.2 setup and facing some rewrite problems after upgrade to 2.5.4. Here is my composer setup (without certificate) to recreate; just make sure you create the instance with 2.5.2.

docker-compose.yml

version: '3'

services:
  wallabag:
    image: wallabag/wallabag:latest
    hostname: wallabag
    restart: always
    container_name: wallabag
    environment:
      - TZ=Europe/Berlin
      - POSTGRES_USER=root
      - POSTGRES_PASSWORD=wallabag
      - SYMFONY__ENV__DATABASE_DRIVER=pdo_pgsql
      - SYMFONY__ENV__DATABASE_HOST=wallabag_db
      - SYMFONY__ENV__DATABASE_PORT=5432
      - SYMFONY__ENV__DATABASE_NAME=wallabag
      - SYMFONY__ENV__DATABASE_USER=wallabag
      - SYMFONY__ENV__DATABASE_PASSWORD=wallabag
      - SYMFONY__ENV__REDIS_HOST=127.0.0.1:6379
      - SYMFONY__ENV__DOMAIN_NAME=http://nuc-desk
      - SYMFONY__ENV__LOCALE=de
    ports:
      - "127.0.0.1:5003:80"
    volumes:
      - images:/var/www/wallabag/web/assets/images
      - /etc/localtime:/etc/localtime:ro
    healthcheck:
      test: ["CMD", "wget" ,"--no-verbose", "--tries=1", "--spider", "http://localhost"]
      interval: 1m
      timeout: 3s
    depends_on:
      - wallabag_db
      - wallabag_cache

  wallabag_db:
    image: docker.io/postgres:13
    hostname: wallabag_db
    restart: always
    container_name: wallabag_db
    environment:
      - TZ=Europe/Berlin
      - POSTGRES_USER=root
      - POSTGRES_PASSWORD=wallabag
    volumes:
      - db13:/var/lib/postgresql/data
      - /etc/localtime:/etc/localtime:ro
    healthcheck:
      test:  ["CMD-SHELL", "pg_isready -q || exit 1"]
      interval: 10s
      timeout: 3s
      retries: 3
    ports:
      - "127.0.0.1:5432:5432"

  wallabag_cache:
    image: redis:alpine
    hostname: wallabag_cache
    restart: always
    container_name: wallabag_cache
    healthcheck:
      test: [ "CMD", "redis-cli", "ping" ]
      interval: 1m
      timeout: 3s

  nginx: 
    image: nginx:latest
    container_name: nginx_proxy
    volumes:
      - ./nginx.conf:/etc/nginx/nginx.conf
    ports:
      - 80:80
    depends_on:
      - wallabag

volumes:
  images:
  db13:

demo nginx.conf according to your notes:

events {

}

http {
  error_log /etc/nginx/error.log warn;
  client_max_body_size 20m;

  proxy_cache_path /etc/nginx/cache keys_zone=one:500m max_size=1000m;

server {
       listen 80 default_server;
       #listen [::]:443 ssl default_server;
       server_name localhost;

       access_log /var/log/nginx/domoticz-access.log;
       error_log /var/log/nginx/domoticz-error.log;

       location / {
        proxy_pass http://wallabag;
        proxy_set_header X-Forwarded-Host $server_name;
                proxy_set_header X-Forwarded-Proto https;
                proxy_set_header X-Forwarded-For $remote_addr;
               }
      }
}

start it up: 4Bob@NUC-Desk:~/Apps/wallabag$ docker-compose up

Starting wallabag_cache ... done
Starting wallabag_db    ... done
Recreating wallabag     ... done
Recreating nginx_proxy  ... done
Attaching to wallabag_cache, wallabag_db, wallabag, nginx_proxy
nginx_proxy       | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
nginx_proxy       | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
nginx_proxy       | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
wallabag          | Starting Wallabag ...
wallabag_db       | 
wallabag_db       | PostgreSQL Database directory appears to contain a database; Skipping initialization
wallabag_db       | 
wallabag          | Waiting for database ...
nginx_proxy       | 10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
wallabag          | WARN: Postgres database is already configured. Remove the environment variable with root password.
wallabag_cache    | 1:C 12 Jun 2023 17:11:45.887 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
wallabag_cache    | 1:C 12 Jun 2023 17:11:45.887 # Redis version=7.0.11, bits=64, commit=00000000, modified=0, pid=1, just started
wallabag_cache    | 1:C 12 Jun 2023 17:11:45.887 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
wallabag_db       | 2023-06-12 19:11:46.023 CEST [1] LOG:  starting PostgreSQL 13.11 (Debian 13.11-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
wallabag          | Installing dependencies from lock file
nginx_proxy       | 10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
wallabag_cache    | 1:M 12 Jun 2023 17:11:45.887 * monotonic clock: POSIX clock_gettime
wallabag_db       | 2023-06-12 19:11:46.024 CEST [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
wallabag          | Verifying lock file contents can be installed on current platform.
nginx_proxy       | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
wallabag_cache    | 1:M 12 Jun 2023 17:11:45.888 * Running mode=standalone, port=6379.
wallabag_cache    | 1:M 12 Jun 2023 17:11:45.888 # Server initialized
wallabag_cache    | 1:M 12 Jun 2023 17:11:45.888 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
wallabag_db       | 2023-06-12 19:11:46.024 CEST [1] LOG:  listening on IPv6 address "::", port 5432
wallabag          | Nothing to install, update or remove
nginx_proxy       | /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
wallabag_cache    | 1:M 12 Jun 2023 17:11:45.889 * Loading RDB produced by version 7.0.11
wallabag_cache    | 1:M 12 Jun 2023 17:11:45.889 * RDB age 63 seconds
wallabag_db       | 2023-06-12 19:11:46.025 CEST [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
wallabag          | Package doctrine/doctrine-cache-bundle is abandoned, you should avoid using it. No replacement was suggested.
wallabag          | Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead.
nginx_proxy       | /docker-entrypoint.sh: Configuration complete; ready for start up
wallabag_cache    | 1:M 12 Jun 2023 17:11:45.889 * RDB memory usage when created 0.85 Mb
wallabag_cache    | 1:M 12 Jun 2023 17:11:45.889 * Done loading RDB, keys loaded: 0, keys expired: 0.
wallabag_cache    | 1:M 12 Jun 2023 17:11:45.889 * DB loaded from disk: 0.000 seconds
wallabag_db       | 2023-06-12 19:11:46.030 CEST [26] LOG:  database system was shut down at 2023-06-12 19:10:41 CEST
wallabag_cache    | 1:M 12 Jun 2023 17:11:45.889 * Ready to accept connections
wallabag          | Package guzzlehttp/ringphp is abandoned, you should avoid using it. No replacement was suggested.
wallabag          | Package guzzlehttp/streams is abandoned, you should avoid using it. No replacement was suggested.
wallabag          | Package hoa/compiler is abandoned, you should avoid using it. No replacement was suggested.
wallabag_db       | 2023-06-12 19:11:46.035 CEST [1] LOG:  database system is ready to accept connections
wallabag          | Package hoa/consistency is abandoned, you should avoid using it. No replacement was suggested.
wallabag          | Package hoa/event is abandoned, you should avoid using it. No replacement was suggested.
wallabag          | Package hoa/exception is abandoned, you should avoid using it. No replacement was suggested.
wallabag          | Package hoa/file is abandoned, you should avoid using it. No replacement was suggested.
wallabag          | Package hoa/iterator is abandoned, you should avoid using it. No replacement was suggested.
wallabag          | Package hoa/math is abandoned, you should avoid using it. No replacement was suggested.
wallabag          | Package hoa/protocol is abandoned, you should avoid using it. No replacement was suggested.
wallabag          | Package hoa/regex is abandoned, you should avoid using it. No replacement was suggested.
wallabag          | Package hoa/ruler is abandoned, you should avoid using it. No replacement was suggested.
wallabag          | Package hoa/stream is abandoned, you should avoid using it. No replacement was suggested.
wallabag          | Package hoa/ustring is abandoned, you should avoid using it. No replacement was suggested.
wallabag          | Package hoa/visitor is abandoned, you should avoid using it. No replacement was suggested.
wallabag          | Package hoa/zformat is abandoned, you should avoid using it. No replacement was suggested.
wallabag          | Package liip/theme-bundle is abandoned, you should avoid using it. Use sylius/theme-bundle instead.
wallabag          | Package scheb/two-factor-bundle is abandoned, you should avoid using it. Use scheb/2fa-bundle instead.
wallabag          | Package sensio/distribution-bundle is abandoned, you should avoid using it. No replacement was suggested.
wallabag          | Package sensio/framework-extra-bundle is abandoned, you should avoid using it. Use Symfony instead.
wallabag          | Package sensiolabs/security-checker is abandoned, you should avoid using it. Use https://github.com/fabpot/local-php-security-checker instead.
wallabag          | Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead.
wallabag          | Package symfony/swiftmailer-bundle is abandoned, you should avoid using it. Use symfony/mailer instead.
wallabag          | Package true/punycode is abandoned, you should avoid using it. No replacement was suggested.
wallabag          | Package twig/extensions is abandoned, you should avoid using it. No replacement was suggested.
wallabag          | Package php-cs-fixer/diff is abandoned, you should avoid using it. No replacement was suggested.
wallabag          | Generating optimized autoload files
wallabag          | Class SimpleHtmlDom\simple_html_dom_node located in ./vendor/mgargano/simplehtmldom/src/simple_html_dom.php does not comply with psr-0 autoloading standard. Skipping.
wallabag          | Class SimpleHtmlDom\simple_html_dom located in ./vendor/mgargano/simplehtmldom/src/simple_html_dom.php does not comply with psr-0 autoloading standard. Skipping.
wallabag          | Class Sensio\Bundle\FrameworkExtraBundle\Tests\DependencyInjection\AddExpressionLanguageProvidersPassTest located in ./vendor/sensio/framework-extra-bundle/Tests/DependencyInjection/Compiler/AddExpressionLanguageProvidersPassTest.php does not comply with psr-4 autoloading standard. Skipping.
wallabag          | Class Sensio\Bundle\FrameworkExtraBundle\Tests\DependencyInjection\AddParamConverterPassTest located in ./vendor/sensio/framework-extra-bundle/Tests/DependencyInjection/Compiler/AddParamConverterPassTest.php does not comply with psr-4 autoloading standard. Skipping.
wallabag          | Class Sensio\Bundle\FrameworkExtraBundle\Tests\Request\ParamConverter\ArgumentNameConverterTest located in ./vendor/sensio/framework-extra-bundle/Tests/Request/ArgumentNameConverterTest.php does not comply with psr-4 autoloading standard. Skipping.
wallabag          | Class Nelmio\ApiDocBundle\Tests\Functional\AppKernel located in ./vendor/nelmio/api-doc-bundle/Nelmio/ApiDocBundle/Tests/Fixtures/app/AppKernel.php does not comply with psr-0 autoloading standard. Skipping.
wallabag          | Class Nelmio\ApiDocBundle\Tests\Extractor\FosRestHandlerTest located in ./vendor/nelmio/api-doc-bundle/Nelmio/ApiDocBundle/Tests/Extractor/Handler/FosRestHandlerTest.php does not comply with psr-0 autoloading standard. Skipping.
wallabag          | Class Nelmio\ApiDocBundle\Tests\Extractor\SensioFrameworkExtraHandlerTest located in ./vendor/nelmio/api-doc-bundle/Nelmio/ApiDocBundle/Tests/Extractor/Handler/SensioFrameworkExtraHandlerTest.php does not comply with psr-0 autoloading standard. Skipping.
wallabag          | Class Liip\ThemeBundle\Tests\EventListener\UseCaseTest located in ./vendor/liip/theme-bundle/Tests/UseCaseTest.php does not comply with psr-4 autoloading standard. Skipping.
wallabag          | Class Liip\ThemeBundle\Tests\DependencyInjection\AsseticTwigFormulaPassTest located in ./vendor/liip/theme-bundle/Tests/DependencyInjection/Compiler/AsseticTwigFormulaPassTest.php does not comply with psr-4 autoloading standard. Skipping.
wallabag          | Class Liip\ThemeBundle\Tests\DependencyInjection\ThemeCompilerPassTest located in ./vendor/liip/theme-bundle/Tests/DependencyInjection/Compiler/ThemeCompilerPassTest.php does not comply with psr-4 autoloading standard. Skipping.
wallabag          | Class Doctrine\Bundle\MigrationsBundle\Tests\DependencyInjection\DoctrineCommandTest located in ./vendor/doctrine/doctrine-migrations-bundle/Tests/Command/DoctrineCommandTest.php does not comply with psr-4 autoloading standard. Skipping.
wallabag          | 57 packages you are using are looking for funding.
wallabag          | Use the `composer fund` command to find out more!
wallabag          | > Incenteev\ParameterHandler\ScriptHandler::buildParameters
wallabag          | Updating the "app/config/parameters.yml" file
wallabag          | > Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap
wallabag          | > Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache
wallabag          | 
wallabag          |  // Clearing the cache for the prod environment with debug                      
wallabag          |  // false                                                                       
wallabag          | 
wallabag          |  [OK] Cache for the "prod" environment (debug=false) was successfully cleared.  
wallabag          | 
wallabag          | > Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installAssets
wallabag          | 
wallabag          |  Trying to install assets as relative symbolic links.
wallabag          | 
wallabag          |  --- ------------------------ ------------------ 
wallabag          |       Bundle                   Method / Error    
wallabag          |  --- ------------------------ ------------------ 
wallabag          |   ✔   NelmioApiDocBundle       relative symlink  
wallabag          |   ✔   CraueConfigBundle        relative symlink  
wallabag          |   ✔   BabDevPagerfantaBundle   relative symlink  
wallabag          |   ✔   FOSJsRoutingBundle       relative symlink  
wallabag          |  --- ------------------------ ------------------ 
wallabag          | 
wallabag          |  [OK] All assets were successfully installed.                                   
wallabag          | 
wallabag          | > Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile
wallabag          | Wallabag is ready!
wallabag          | 172.18.0.5 - - [12/Jun/2023:19:12:10 +0200] "GET /login HTTP/1.0" 200 1279 "http://nuc-desk/unread/list" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
wallabag          | 172.18.0.5 - - [12/Jun/2023:19:12:10 +0200] "GET /js/routing?callback=fos.Router.setData HTTP/1.0" 200 372 "http://nuc-desk/login" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
wallabag          | 172.18.0.5 - - [12/Jun/2023:19:12:21 +0200] "POST /login_check HTTP/1.0" 302 190 "http://nuc-desk/login" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
wallabag          | 127.0.0.1 - - [12/Jun/2023:19:12:46 +0200] "GET / HTTP/1.1" 302 346 "-" "Wget"
wallabag          | 127.0.0.1 - - [12/Jun/2023:19:12:46 +0200] "GET /login HTTP/1.1" 200 5421 "-" "Wget"
wallabag          | 127.0.0.1 - - [12/Jun/2023:19:13:47 +0200] "GET / HTTP/1.1" 302 346 "-" "Wget"
wallabag          | 127.0.0.1 - - [12/Jun/2023:19:13:47 +0200] "GET /login HTTP/1.1" 200 5420 "-" "Wget"

Upgrade so far looks good, but my SYMFONYENVDOMAIN_NAME http://nuc-desk/ is now being rewritten to https://wallabag

Can you please help me further?

janaxhell commented 1 year ago

Just realized that this happens to me as well and I also cannot revert back to 2.5.2, I get error 400. Wallabag keeps repeting

Package guzzlehttp/ringphp is abandoned, you should avoid using it. No replacement was suggested.
Package guzzlehttp/streams is abandoned, you should avoid using it. No replacement was suggested.
Package hoa/compiler is abandoned, you should avoid using it. No replacement was suggested.
Package hoa/consistency is abandoned, you should avoid using it. No replacement was suggested.
Package hoa/event is abandoned, you should avoid using it. No replacement was suggested.
Package hoa/exception is abandoned, you should avoid using it. No replacement was suggested.
Package hoa/file is abandoned, you should avoid using it. No replacement was suggested.
Package hoa/iterator is abandoned, you should avoid using it. No replacement was suggested.
Package hoa/math is abandoned, you should avoid using it. No replacement was suggested.
Package hoa/protocol is abandoned, you should avoid using it. No replacement was suggested.
Package hoa/regex is abandoned, you should avoid using it. No replacement was suggested.
Package hoa/ruler is abandoned, you should avoid using it. No replacement was suggested.
Package hoa/stream is abandoned, you should avoid using it. No replacement was suggested.
Package hoa/ustring is abandoned, you should avoid using it. No replacement was suggested.
Package hoa/visitor is abandoned, you should avoid using it. No replacement was suggested.
Package hoa/zformat is abandoned, you should avoid using it. No replacement was suggested.
718aba commented 1 year ago

I also have problems with my docker wallabag config after upgrading.

After login the browser is forwarded to https://localhost:7080/login

Here my configs

Docker Wallabag:

docker run -d \ -v /var/dockerstorage/wallabag/data:/var/www/wallabag/data \ -v /var/dockerstorage/wallabag/images:/var/www/wallabag/web/assets/images \ -e SYMFONYENVMAILER_HOST=smtp.... \ -e SYMFONYENVMAILER_USER=myuser \ -e SYMFONYENVMAILER_PASSWORD=mypassword \ -e SYMFONYENVFROM_EMAIL=myemail@... \ -e "SYMFONYENVDOMAIN_NAME=https://myserver:12345" \ --name mswallabag \ --restart=unless-stopped \ -p 127.0.0.1:7080:80 \ wallabag/wallabag

NGINX:

server { listen 12345; ssl on; server_name localhost;

server_name myserver; #Did not work either

    access_log /var/log/nginx/wb-access.log;
    error_log /var/log/nginx/wb-error.log;
    ssl_certificate         /etc/letsencrypt/live/...;
    ssl_certificate_key     /etc/letsencrypt/live/...;
    root /var/www/pages;
    client_max_body_size 5M;
    index index.html index.htm index.nginx-debian.html;
    location / {
      proxy_pass http://localhost:7080;
      proxy_set_header X-Forwarded-Host $server_name;
      proxy_set_header X-Forwarded-Proto https;
      proxy_set_header X-Forwarded-For $remote_addr;
    }

}

danielpanteleit commented 1 year ago

For me there were two working solutions:

  1. Commenting out proxy_set_header X-Forwarded-Proto https
  2. Adding proxy_redirect https://127.0.0.1:7080/ https://wallabag.server.tld/ (Change ports/server names as needed) to the location block.

For the upgrade to 2.6.1 I also needed to migrate the db (see https://github.com/wallabag/wallabag/issues/6649#issuecomment-1616021842)

718aba commented 1 year ago

Thank you! As I made several changes, downloaded again the docker image, ... I do not know what finally worked. My location definition looks like below now: proxy_pass http://127.0.0.1:7080; proxy_set_header Host $host:12345; # <<< maybe this worked(?) proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto https; ... I tried the same config above, and it worked on my raspberry-docker, too.

Thank you, @danielpanteleit, I will give it a try later. As my local host config does work with ssl, I think, it is ok to change "https://127.0.0.1:7080" to "http://127.0.0.1:7080".

718aba commented 1 year ago

...not work...

adrinux commented 1 year ago

I'm doing a fresh install, with the added twist of using Podman instead of Docker, and also see this issue with my nginx proxy getting redirected instead of proxied.

As mentioned by @718aba I find adding the Host header helps, though I found adding the port on the container didn't, so:

proxy_set_header Host $host;

I now have a '500 Internal server error' to debug instead. Progress!

[Edit] The server error was fixed by running the database migration command...on a fresh install that seems odd but it's a different issue.

ktpx commented 1 year ago

I don't think this is a nginx issue, as nothing changed here, except the docker image of wallabag. it must not return the correct domain on requests, but the proxypass addy.

Oddly downgrading container does not fix it, but then again, not sure which version i ran before. Havent upgraded in a minute.

ktpx commented 1 year ago

I also have problems with my docker wallabag config after upgrading.

After login the browser is forwarded to https://localhost:7080/login

Here my configs

Docker Wallabag:

docker run -d -v /var/dockerstorage/wallabag/data:/var/www/wallabag/data -v /var/dockerstorage/wallabag/images:/var/www/wallabag/web/assets/images -e SYMFONYENVMAILER_HOST=smtp.... -e SYMFONYENVMAILER_USER=myuser -e SYMFONYENVMAILER_PASSWORD=mypassword -e SYMFONYENVFROM_EMAIL=myemail@... -e "SYMFONYENVDOMAIN_NAME=https://myserver:12345" --name mswallabag --restart=unless-stopped -p 127.0.0.1:7080:80 wallabag/wallabag

NGINX:

server { listen 12345; ssl on; server_name localhost; #server_name myserver; #Did not work either access_log /var/log/nginx/wb-access.log; error_log /var/log/nginx/wb-error.log; ssl_certificate /etc/letsencrypt/live/...; ssl_certificate_key /etc/letsencrypt/live/...; root /var/www/pages; client_max_body_size 5M; index index.html index.htm index.nginx-debian.html; location / { proxy_pass http://localhost:7080; proxy_set_header X-Forwarded-Host $server_name; proxy_set_header X-Forwarded-Proto https; proxy_set_header X-Forwarded-For $remote_addr; } }

Not related to this issue, but the SMTP settings have been changed, to a one liner. Check the release notes for a few versions back.

ktpx commented 1 year ago

I'm doing a fresh install, with the added twist of using Podman instead of Docker, and also see this issue with my nginx proxy getting redirected instead of proxied.

As mentioned by @718aba I find adding the Host header helps, though I found adding the port on the container didn't, so:

proxy_set_header Host $host;

I now have a '500 Internal server error' to debug instead. Progress!

[Edit] The server error was fixed by running the database migration command...on a fresh install that seems odd but it's a different issue.

Ok, this worked for me too after i migrated the db (missed that part). Not sure why nginx config suddenly breaks after latest, but anyhow, this should probably be added to the README. :+1:

4Syno commented 1 year ago

As mentioned by @718aba I find adding the Host header helps, though I found adding the port on the container didn't, so:

proxy_set_header Host $host;

Thank you for your input; Unfortunately this recommendation does not work for me. I am already using the root "/" of my web server and with this option everything is redirected there after login. Example: Now the call is done via https://domain:port after the login I always end up on https://domain/login but it should be https://domain:port/login.

4Syno commented 1 year ago

Found it; in this case the server port can also define: proxy_set_header Host $host:$server_port;

2.6.6 runs here now too. Thanks!

bjrjk commented 7 months ago

I met the same problem behind apache reverse proxy. Solved with ProxyPreserveHost On.