limesurvey
limesurvey copied to clipboard
How to use HTTP_LOCATION correctly?
Hi,
my URL is supposed to be https://my.server.net/surveys
. So my docker-compose config looks like this:
limesurvey:
restart: always
image: crramirez/limesurvey:2.72.3
links:
- "mysql:db"
expose:
- "80"
environment:
- "DISABLE_MYSQL=yes"
- "HTTP_LOCATION=surveys"
volumes:
- "./limesurvey/upload:/app/upload"
- "./limesurvey/config/config-defaults.php:/app/application/config/config-defaults.php"
But when I request https://my.server.net/surveys
in the browser I always get redirected to https://my.server.net/index.php?r=installer
. What am I doing wrong?
Hello,
Check your docker-compose.yml you are using expose instead of ports:
limesurvey:
restart: always
image: crramirez/limesurvey:2.72.3
links:
- "mysql:db"
ports:
- "80:80"
environment:
- "DISABLE_MYSQL=yes"
- "HTTP_LOCATION=surveys"
volumes:
- "./limesurvey/upload:/app/upload"
- "./limesurvey/config/config-defaults.php:/app/application/config/config-defaults.php"
Probably you have another instance running and it is who is answering you.
That I use expose
and ports
is correct. The reason is that I have an nginx container running which acts as a reverse proxy. This container is the only container listening on port 80. Thus, all the other containers must expose their ports "internally", especially the port 80 is already used by the nginx container. The nginx container is also the place where I configured that requests to ../surveys/
are redirected to the limesurvey container.
The fact that my request to https://my.server.net/surveys
is converted to https://my.server.net/index.php?r=installer
is supposed to show that it is somehow rewrittten by the limesurvey instance, right? I mean, the installer
is requested in contrast to the request to /surveys
. This looks like if somewhere the original request to a subpath of my domain is rewritten to the domain itself.
Having the exact same issue here - any news so far?
@lcnittl Do you also have an nginx in front of limesurvey?
Yes, I have two LXC containers: One with nginx functioning as reverse proxy The other one with nginx functioning as webserver that serves limesurvey
Edit: Seems like I am in the wrong repo here - thought this is the LimeSurvey/LimeSurvey one. Was quite excited that I found a report of the same issue ;)
Ok if you send me the whole docker-compose.yml I can install it, make some tests and give you an option.
I think I will have to file this at LimeSurvey/LimeSurvey - I am not using Docker. Sorry for the confusion. Anyways, it looks like LimeSurvey is rewriting the request as suggested by @jreimone.
Ah, ok. Good you found the solution or at least the path