Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use HTTP_LOCATION correctly? #16

Open
jreimone opened this issue Mar 2, 2018 · 8 comments
Open

How to use HTTP_LOCATION correctly? #16

jreimone opened this issue Mar 2, 2018 · 8 comments

Comments

@jreimone
Copy link

jreimone commented Mar 2, 2018

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?

@crramirez
Copy link
Owner

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.

@jreimone
Copy link
Author

jreimone commented Mar 5, 2018

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.

@lcnittl
Copy link

lcnittl commented Apr 23, 2019

Having the exact same issue here - any news so far?

@crramirez
Copy link
Owner

@lcnittl Do you also have an nginx in front of limesurvey?

@lcnittl
Copy link

lcnittl commented Apr 23, 2019

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 ;)

@crramirez
Copy link
Owner

Ok if you send me the whole docker-compose.yml I can install it, make some tests and give you an option.

@lcnittl
Copy link

lcnittl commented Apr 23, 2019

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.

@crramirez
Copy link
Owner

Ah, ok. Good you found the solution or at least the path

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants