Check out the LimeSurvey source code on GitHub!

Accessing Limesurvey installed on an internal server from an external site

More
6 years 3 weeks ago - 6 years 3 weeks ago #56234 by zenil79
Hi All,

My setup is such that I have limesurvey installed on a server in a private network and its accessed from a public facing domain.The internal server could be http://wineyard:8000/limesurvey ..And the external domain could be www.cbb.com . So a request to www.cbb.com/limesurvey gets forwarded using apache forwarding rules to http://wineyard:8000/limesurvey/

I find that in this setup when I launch a survey using the www.cbb.com url, the survey code gets generated with the internal url. So In the source say instead of www.cbb.com/limesurvey/template.js , i see http://wineyard:8000/limesurvey/template.js. Needless to say the survey doesn't work.

I find an entry in config.php :
$rooturl = "http://{$_SERVER}/limesurvey";
I believe this entry needs to be changed to
$rooturl = " www.cbb.com/limesurvey ";

Are there any other changes that I need to make. Plus why is $_SERVER returning the internal url http://wineyard:8000 ? Shouldn't it return the url where the actual request came from which is www.cbb.com ?
Last Edit: 6 years 3 weeks ago by zenil79.

Please Log in to join the conversation.

More
6 years 3 weeks ago #56241 by holch
Limesurvey doesn't know about how you configured your external URL. It depends very much on how your Apache is configured, but your "construction" sounds pretty weird to me. On the other hand, I am not a server admin and have little knowledge about those things.

What $_SERVER does is to look on the server, for which domain/URL it is configured and it is obviously wineyard:8000 and not www.cbb.com what it finds.

Probably it will work with $rooturl = " www.cbb.com/limesurvey ".

Just give it a try. Maybe someone with more server admin knowledge can help out here.

Who is adminstrating the server on your side? This person should be able to help you the best. Because this is more a server administration thing than a limesurvey aspect.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds
The following user(s) said Thank You: zenil79

Please Log in to join the conversation.

More
6 years 3 weeks ago #56286 by zenil79
yes looks like $rooturl is the solution

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form