martialblog/docker-limesurvey

Errors in link to static assets

PovilasID opened this issue · 2 comments

Hey,

I am using Traefik 2.8.4 with almost the default settings:

services:
  limesurvey:
    image: martialblog/limesurvey
    # build:
    #   context: 5.0/apache/
    #   dockerfile: Dockerfile
    networks:
      - proxy
      - default
    labels:
      traefik.enable: 'true'
      traefik.http.routers.limesurvey-http-router.entrypoints: "http"
      traefik.docker.network: "proxy"
      traefik.http.routers.limesurvey-http-router.rule: "Host(`limesurvey.trial`)"
      traefik.http.services.limesurvey-service.loadbalancer.server.port: "8080"
    links:
      - lime-db
    depends_on:
      - lime-db
    volumes:
      # Unfortunately the StripPrefix Function in Traefik won't work;
      # Meaning, we will have to set 'Alias /limesurvey "/var/www/html"' in the Apache Config
      - "./config/apache-example.conf:/etc/apache2/sites-available/000-default.conf:ro"
    environment:
      - "DB_HOST=lime-db"
      - "DB_PASSWORD=secret"
      - "ADMIN_PASSWORD=foobar"
      - "PUBLIC_URL=http://limesurvey.trial"
      - "BASE_URL=http://limesurvey.trial"

I have a local DNS record pointing to IP that makes the domain possible same as any actual domain.

However, almost none of the static assets get served apart from the donate logo because their link is missing as slash "http:/lime..":

<img src="http:/limesurvey.trial/assets/images/screenshots/F.png">

If I go to the link with double slash it gets loaded just fine. Also CSS and all the other links seam to be working fine.
Maybe it is because I am not running SSL?

Hi, you might want to try to explicitly set the Host Header via a customRequestHeaders in Traefik

I updated the examples in the repo. I think it's very likely that the Host Header has to be configured, either in the LS Container or Proxy. Please have a look.

Let me know if there are any further issues.