Trouble with ports using Docker
Hi everyone,
I am trying to install Tiki using Docker-Compose. On my host I have an nginx taking care of https.
I can complete the Tiki Installer. I am choosing "HTTPS login: Disabled". But when it comes to login, it is calling https://wiki.example.com:5000/tiki-login.php which is obviously wrong, 5000 is the internal Docker-Port.
Here are the interesting config parts:
docker-compose.yml
version: '3.7' services: haproxy: image: eeacms/haproxy depends_on: - tiki ports: - "8083:5000" environment: BACKENDS: "tiki" DNS_ENABLED: "true" LOG_LEVEL: "info" tiki: image: tikiwiki/tikiwiki:latest depends_on: - db deploy: replicas: 1 ...
nginx:
server { listen 80; listen [::]:80; server_name wiki.example.com; return 301 https://$host$request_uri; } server { listen 443; listen [::]:443; server_name wiki.example.com; ssl on; ssl_certificate /opt/some/dir/cert.pem; ssl_certificate_key /opt/some/dir/key.pem; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers HIGH:!aNULL:!MD5; location / { proxy_pass http://127.0.0.1:8083/; proxy_set_header Host $http_host; 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 $scheme; client_max_body_size 0; } }
I have tried a bunch of things to get things right, but with no success.
I have tried to update the configuration in the mariadb with:
INSERT INTO tiki_preferences (name, value) VALUES ('feature_port_rewriting', 'y');
and I have tried to change the configuration for 'fallbackBaseUrl' like
INSERT INTO tiki_preferences (name, value) VALUES ('fallbackBaseUrl', 'https://wiki.example.com');
but this does not change anything to this behavior.
I could of course try the use nginx 'sub_filter' to tweak the content of the delivered pages, but that seems wrong to me.
So my simple question is:
How do I configure Tiki to use just the right port?
Thanks in advance,
Boris