Check out the LimeSurvey source code on GitHub!

Accessing Limesurvey installed on an internal server from an external site

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 . So a request to gets forwarded using apache forwarding rules to http://wineyard:8000/limesurvey/

I find that in this setup when I launch a survey using the url, the survey code gets generated with the internal url. So In the source say instead of , 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 = " ";

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 ?
Last Edit: 6 years 3 weeks ago by zenil79.

Please Log in to join the conversation.

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 what it finds.

Probably it will work with $rooturl = " ".

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.

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