Welcome to the LimeSurvey Community Forum

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

Troubles with SSL

  • keychimp
  • keychimp's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 3 months ago #115141 by keychimp
Troubles with SSL was created by keychimp
Hi!

I would like to run LIME over a secure connection.

My provider (hosteurope.de) provides a so called "SSL proxy", folders can be reached this way:
Code:
https://ssl.webpack.de/[my domain]/[my folder]/


Without SSL LIME works without problems from this URL:
Code:
http://[my domain]/[my folder]

But LIME doesn´t work if I try the "SSL proxy". The stylesheets don´t work because their path is relative and - unfortunately - not correct:
Code:
<link rel="stylesheet" type="text/css" href="/[my folder]/upload/templates/[my template]/template.css">

instead of:
Code:
<link rel="stylesheet" type="text/css" href="/[my domain]/[my folder]/upload/templates/[my template]/template.css">


The link to the survey doesn´t work either but leads to an error page of the "SSL proxy" because it leads to ...
Code:
https://ssl.webpack.de/[my folder]//index.php/[my survey]?lang=de

and not to ...
Code:
https://ssl.webpack.de/[my domain]/[my folder]//index.php/[my survey]?lang=de

So "/[my domain]" is missing in the path.

In the source of the page this path is relative - like the path of the stylesheets:
Code:
<a class="surveytitle" href="/[my folder]/index.php/[my survey]?lang=de">[name of my survey]</a>


How can I change these paths in LIME?
Is there any way to change all paths from relative to absolute?

For the stylesheets ...
Code:
<link rel="stylesheet" type="text/css" href="https://ssl.webpack.de/[my domain]/[my folder]/upload/templates/[my template]/template.css">

... and for the survey ...
Code:
<a class="surveytitle" href="https://ssl.webpack.de/[my domain]/[my folder]/index.php/[my survey]?lang=de">[name of my survey]</a>


Is there anything else that I have to think of with SSL?

TIA!

LimeSurvey Version 2.05+ Build 141126
PHP Version 5.3.29
MySQL 5.5.38
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 3 months ago #115152 by holch
Replied by holch on topic Troubles with SSL
Well, these proxies are not a good solution anyway.

A SSL certificate for your domain will cost you maybe 15 Euro per year.

But maybe something can be done in the config file. Denis posted a solution for another problem with the domain and maybe there is something that can be done via the config file as well here.

Had a quick look and the certificates at Hosteurope are quite expensive! You even have to pay 30 Euros for the certificate that is not even for your domain? and 50 Euros if you want one for your domain? That is hefty.

I think I recall that I paid 8 Dollars per year some while ago. Have to check.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The following user(s) said Thank You: keychimp
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 3 months ago - 9 years 3 months ago #115153 by holch
Replied by holch on topic Troubles with SSL

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Last edit: 9 years 3 months ago by holch.
The topic has been locked.
  • keychimp
  • keychimp's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 3 months ago #115158 by keychimp
Replied by keychimp on topic Troubles with SSL
Thank's a lot for your hint!

You are right. A SSL certificate ist expensive at hosteurope. You have to move from a solution for 5€/month to a solution for 20€/month to use this 30€/year certificate. That ist too expensive!



I did a lot of trial & error in the config.php and config-defaults.php file:

Changing ...
Code:
$config['publicurl'] = Yii::app()->baseUrl . '/';

... to ...
Code:
$config['publicurl'] = 'https://ssl.webpack.de/[my domain]/my folder/';

... brings back my stylesheets. That even works if the survey is called from:
Code:
http://[my domain]/my folder/';

With this URL the survey works fine but if called it via ...
Code:
https://ssl.webpack.de/[my domain]/my folder/

... it still doesn't work:

The action of the form lacks the leading "[my domain]":
Code:
<form id="limesurvey" name="limesurvey" autocomplete="off" action="/[my folder]/index.php/survey/index" method="post">



For testing reasons I even made a copy of the LIME folder within a folder called "[my domain]".

Calling ...
Code:
https://ssl.webpack.de/[my domain]/[my domain]/my folder/

... works for one form so maybe I should try a cascade of folders! Just joking ... ;-/



So - how to get the leading [my domain] in the form action?!

TIA
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 3 months ago #115166 by DenisChenu
Replied by DenisChenu on topic Troubles with SSL
Hi,

Better understanding now.

$config and Yii system are only used when use createAbsoluteUrl. In general we don't use createAbsoluteUrl because it's not needed.

Look at the link on "survey summary" to see if it's work.

See the screen shot (i don't own example.org ...)

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: keychimp
The topic has been locked.
More
9 years 3 months ago #115273 by jelo
Replied by jelo on topic Troubles with SSL

keychimp wrote: You are right. A SSL certificate ist expensive at hosteurope. You have to move from a solution for 5€/month to a solution for 20€/month to use this 30€/year certificate. That ist too expensive!

Which Webpack are you using at HE?

There where some differences with the SSLProxy between the packages.

You can try to rewrite all URLS via htaccess:
Code:
RewriteEngine On
RewriteCond %{REMOTE_ADDR} !^10\.30\.7\.1(?:37|38|39|40)$
RewriteRule ^ https://ssl.webpack.de/%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The following user(s) said Thank You: keychimp
The topic has been locked.
  • keychimp
  • keychimp's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 3 months ago #115275 by keychimp
Replied by keychimp on topic Troubles with SSL
Dear Denis and dear Jelo!

Thank you very much for your answers!

Denis,
if I set the "publicurl" to " ssl.webpack.de/example.org/lime/ " this leads to an empty page. I tried all variations with and without "/", with and without the name of the folder and so on.
As you can see below the cause of the trouble seems to be some nasty behavior of the webproxy that obviously has some problems to follow the right links.

Jelo,
I am using "Webpack 4 L" so I am "allowed" to use .htaccess.

With your rewrite I can force all requests from "http://" to the webproxy but there I have the same problem: In the URL that LIME provides the [my domain] part ist missing.

So if my domain is "example.org" and LIME is in the folder "lime" with "http://" the URL is like this:
Code:
http://example.org/lime/


If I want to use SSL I have to use the webproxy of my provider. So the URL is:
Code:
https://ssl.webpack.de/example.org/lime/


What happens if I call this URL?

I come to the welcome page of LIME (without CSS - wrong path!) that shows the link to my survey.

In the source code you can see that this link is:
Code:
<a class="surveytitle" href="/lime/index.php/123456?lang=de">Example Survey</a>


So far so good but a click on this link leads to the page ...
Code:
https://ssl.webpack.de/lime/index.php/123456?lang=de

... and because the "example.org/"-part of the URL is missing it leads to an error page of the webproxy.


The relative path should look this way so that it works with the webproxy:
Code:
<a class="surveytitle" href="/example.org/lime/index.php/123456?lang=de">Example Survey</a>


So the problem is that LIME and the webproxy don't work together.

I think we can put the blame on the webproxy!

But as I cannot alter the behavior of the webproxy I have to try something with LIME.

The solution would be to ...

* either find a way that LIME adds the missing "example.org/"-part to the relative path
* or to tell LIME to use the absolute path:
Code:
https://ssl.webpack.de/example.org/lime/index.php/123456?lang=de

I hope I could express myself clearly.

TIA
Thomas
The topic has been locked.
More
8 years 6 months ago #123978 by ttomljen
Replied by ttomljen on topic Troubles with SSL
hi everyone

I also have a problem with SSL.
My webpage works fine without SSL, but when I try HTTPS protocol, it just loops to infinity and nothing happens.

We have multiple pages, so I know that certificate (wildcard) works fine.

Does anyone have any sugestions?
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose