How to setup limesurvey on a sub-path
SebastianCmentowski opened this issue · 8 comments
I am trying to setup this limesurvey container on a custom path prefix (eg /limesurvey) using Traefik.
However, I just can't get it working.
If I split the prefix, the pages loads, but limesurvey's automatic forwarding (from index.php/admin to the login page) misses the necessary prefix.
If I keep the prefix, limesurvey does not work properly anymore (due to not finding the own ressources).
Any idea how I could get it working?
Hi, what Image/Configuration are you using?
If it's the Apache Image, could be that you need to adjust the apache.conf
and or BASE_URL
.
https://github.com/martialblog/docker-limesurvey/blob/master/examples/apache-example.conf
Might be related to #49
I tried various configurations (apache, external nginx server...).
Tbh, I don't have much expertise in configuring webservers and never worked with Apache before.
I tried changing the configuration (mounting the changed file into the container like this: - ${PWD}/000-default.conf:/etc/apache2/sites-available/000-default.conf), but as Apache still mocks about not knowing the ServerName, I reckon that the config is not even active
This is definitely something we should document.
@SebastianCmentowski Please share the Traefik configuration you are using and which environment you are in (docker compose, kubernetes etc.)
If I understand the Apache configuration in this repository correctly, the only thing you need to set for limesurvey if the BASE_URL environment variable, e.g. BASE_URL=https://example.com/limesurvey/
.
Hi @jacksgt,
sure, here you go:
docker-compose.txt (I attached the complete docker-compose as txt - yml not supported)
My whole setup is based on docker-compose, with Traefik running alongside Portainer and GitLab (all of them already isolated by path prefixes).
Once we got this figured out, we shoud put a working example in the repository.
I started drawing up an example with Traefik and a Path. However, with the present config we run into the issue with the Admin URL. Meaning when entering a password you will get redirected to the wrong path.
https://github.com/martialblog/docker-limesurvey/blob/traefik-example/docker-compose.traefik.yml
Ok so the StripPrefix won't work, you have to pass an Alias config in the webserver.
See #108
I just tried the solution and it works perfectly fine! Thanks a lot!