Welcome to the LimeSurvey Community Forum

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

$rooturl

  • quaint
  • quaint's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 4 months ago - 11 years 4 months ago #88002 by quaint
Replied by quaint on topic Aw: $rooturl


'components' => array(
...
'request' => array(
'baseUrl' => ' www.example.com ',
),
)


Hi Mazi,

I've just added this in to the config.php file; however, when I input the hostname all css dies - see linked screenshot - and, worst of all, it doesn't seem to even resolve the issue.

If I use the hostname and the directory (adding ' surveys.northerndeanery.nhs.uk/pineapple ' then the formatting returns, but the problem still isn't fixed.

If I'm not missing something (in httpd.conf or config.php) then I'm a bit lost as to where to go next.

I can make a contribution to the project from my organisation to get this fixed; it worked just fine with 1.92+ and I'm a little lost as to why I'm having so much trouble with 2.00+
Last edit: 11 years 4 months ago by quaint.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
11 years 4 months ago #88004 by DenisChenu
Replied by DenisChenu on topic Aw: $rooturl
I think you have to set all url in config.php

Look at end of the config-default.php,
And set all url to your url.

Think actually,
In config-default:
$config is set to surveys.northerndeanery.nhs.uk/templates because Yii::app()->baseUrl are surveys.northerndeanery.nhs.uk/ at this time, and is modified only after in config.php.

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • quaint
  • quaint's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 4 months ago - 11 years 4 months ago #88012 by quaint
Replied by quaint on topic Aw: $rooturl
I'm sorry, I'm now utterly lost.


if I put the code
Code:
 
'request'=>array(
'baseUrl'=>'http://surveys.northerndeanery.nhs.uk',
),
 

into the config.php file, I get no template or css, essentially a text-only LimeSurvey admin screen.

If I change the code to
Code:
 
'request'=>array(
'baseUrl'=>'http://surveys.northerndeanery.nhs.uk/pineapple',
),
 

then everything looks normal, but the surveys are still listed as
Code:
http://80.194.247.xxx
in both the invite emails and in the survey title page.

If I change the config.php to read
Code:
 
'request'=>array(
'baseUrl'=>'http://surveys.northerndeanery.nhs.uk',
),
 

and then modify the config-defaults.php to point to the subdirectory /pineapple/templates as you suggest below, then I get the templates and the CSS and everything looks normal, but the URLs are still pointing to the IP address, rather than surveys.northerndeanery.nhs.uk/ .

Am I still missing something?
Last edit: 11 years 4 months ago by quaint. Reason: missed some apostrophes
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
11 years 4 months ago #88021 by DenisChenu
Replied by DenisChenu on topic Aw: $rooturl

quaint wrote: and then modify the config-defaults.php to point to the subdirectory /pineapple/templates as you suggest below, then I get the templates and the CSS and everything looks normal, but the URLs are still pointing to the IP address, rather than surveys.northerndeanery.nhs.uk/ .

What survey URL ? In the mail ?

Maybe some bug reporting to do ?

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • quaint
  • quaint's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 4 months ago #88024 by quaint
Replied by quaint on topic Aw: $rooturl
Both on the invitation emails and on the title screen for surveys, they're listing as IPs.

Do I need to change anything in my apache configuration?

Still puzzled as to why it doesn't work in V2.00 but was functional in 1.92+.

Will submit another bug report.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
11 years 4 months ago #88031 by DenisChenu
Replied by DenisChenu on topic $rooturl
Got it !!

In config.php :
Code:
'components' => array(
        'request'=>array(
            'hostInfo'=>'http://surveys.northerndeanery.nhs.uk',
        ),
hostInfo is used for createAbsoluteUrl

For surveylisting, we just use createUrl, this make url like this : /index.php/.... and it's OK.

But for admin page, we force the absolute url, maybe it's not a big idea.

Only use absolute url for "survey url" in survey description and in survey mail.

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The following user(s) said Thank You: quaint
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
11 years 4 months ago #88032 by DenisChenu
Replied by DenisChenu on topic Aw: $rooturl

quaint wrote: Will submit another bug report.

Plesa, give the number , or best the complete bug report link (with number).

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • quaint
  • quaint's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 4 months ago #88034 by quaint
Replied by quaint on topic Aw: $rooturl
Success!

That seems to do the job!

Thanks very much. I think now it should just be a case of updating the documentation to say "hostinfo" rather than "baseUrl".

I'd actually submitted that bug report mere seconds from noticing your reply here:

bugs.limesurvey.org/view.php?id=6844
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
11 years 4 months ago #88035 by DenisChenu
Replied by DenisChenu on topic Aw: $rooturl

quaint wrote: Thanks very much. I think now it should just be a case of updating the documentation to say "hostinfo" rather than "baseUrl".

Please,

Do it, docs is a wiki :).

And for bug report, think this solution is not so easy. We have to use a $config for rooturl like in 1.92.

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
More
9 years 8 months ago #110407 by Gordon55M
Replied by Gordon55M on topic $rooturl
This worked for me, thanks so much!
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 8 months ago - 9 years 8 months ago #110417 by DenisChenu
Replied by DenisChenu on topic $rooturl

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Last edit: 9 years 8 months ago by DenisChenu.
The topic has been locked.
More
6 years 11 months ago - 6 years 11 months ago #152465 by e_lannaud
Replied by e_lannaud on topic $rooturl
It's not work.. each time i save the configuration, it's redirected to http:\/\/secure.domain.org/survey-2017/
Code:
https://secure.domain.org/survey-2017/
          |
------    |    ------       ------------------------------------
Client|-https->| LB |-http->|    VH-internal:1234/survey-2017   |
------         ------       | Limesurvey version: 2.57.1+161205 |
                            ------------------------------------

in application/extensions/LimeScript/LimeScript.php is test to change:
Code:
            //$data['baseUrl']                    = Yii::app()->getBaseUrl(true);
            $data['baseUrl']                    = Yii::app()->getConfig("publicurl");
It modifies as well the baseUrl":"https:\/\/secure.domain.org\/survey-2017":
Code:
<script type="text/javascript">
/*<![CDATA[*/
LS.data = {"baseUrl":"https:\/\/secure.domain.org\/survey-2017","showScriptName":true,"urlFormat":"path","adminImageUrl":"\/survey-2017\/styles\/Sea_Green\/images\/","csrfToken":"ef39d73f0b8b4xxxxx75ef52d1e6dcax5d","language":"en","replacementFields":{"path":"\/survey-2017\/index.php\/admin\/limereplacementfields\/sa\/index"}};
$.ajaxSetup({data: {YII_CSRF_TOKEN: LS.data.csrfToken}});
/*]]>*/
</script>

I "solve" the problem to create a VH: http:\/\/secure.domain.org with rewrite URI to https:\/\/secure.domain.org...

Is it possible the create this HTTPS/HTTP configuation ?

Thank you.
Eric
Last edit: 6 years 11 months ago by e_lannaud.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose