Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

LimeSurvey behind Load Balancer baseUrl, publicUrl, always issues

  • VarJacek
  • VarJacek's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 8 months ago #224568 by VarJacek
* I had to remove full url from topic because form says too many links. 

Latest build Release 5.2.12
LS is working pretty well as long, as hosted directly. For bigger network architecture the problem begins:
example.com/customers/feedback -> internalhostname.domain/

LS by default in returning HTML is using host path leading by "/" so obviously the client will not find  ex.
example.com/tmp/assets/9578e481/roboto.css because right path should be
example.com/customers/feedback/tmp/assets/9578e481/roboto.css

<link rel="stylesheet" type="text/css" href="/tmp/assets/9578e481/roboto.css" />
<link rel="stylesheet" type="text/css" href="/tmp/assets/9578e481/icomoon.css" />

The answer according to forum should be pretty easy. Go to config.php and add publicUrl. The problem is that public URL is only for survey/link reference and the dashboard left intact.
manual.limesurvey.org/Optional_settings
Another thread says about rooturl variable but it seems deprecated or not used at all, also missing in manual above.

The next thread suggests go to config-defaults.php and overwrite
$config = "example.com/customers/feedback" 
and so far it's the best choice but not fully, because some parts of dashboard use another reference to create URL.

Next thread and change in config.php urlmanager baseUrl works better for admin console but still some issues remains

           'urlManager' => array(
                        'urlFormat' => 'get',
                        'baseUrl'=>' example.com/customers/feedback ',

Some visual components (ex. add a new question) is still referring to main "/" and ignore publicurl, baseurl, rooturl and everything we can imagine.
So the next trick is to change Yii request which is in read only ...  I want to be wrong but it looks LimeSurvey having multiple way of creating URL reference across many components is using many variables as reference to construct full URL. I started to patch some files but when update will come everything will be lost and have to use diff to implement them again. 

If there is no real way to run Limesurvey in subdirectory behind load balancer, because very often the returning URL reference is using local WWW server path, then it's preventing LS from deployment in big shared environment like Kubernetes. During the testing I used docker to make sure the build and testing is always the same to measure results of change. The only one way to make it work with LB is to have dedicated domain pointing / to root limesurvey.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
2 years 8 months ago #224581 by DenisChenu
In subdirectory : i never test …

Maybe it's more simple to set an alias in your internalhostname ?

Else : 5.X have new issue with url, maybe you can check on 3.X ? It work out of the box in 3.X (except the publicurl to be set for emailing)

bugs.limesurvey.org/view.php?id=17862

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
2 years 8 months ago #224582 by DenisChenu
PS : not urlManager to be updated,

But www.yiiframework.com/doc/api/1.1/CHttpRequest

Try
Code:
'request' => array(
    'hostInfo' => 'http://www.example.org/'
    'baseUrl' => 'customers/feedback '
),

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose