Page 1 of 1
How do I get SSL working?
Posted: Mon Mar 09, 2009 10:48 am
by schimanke
Hi there,
I have a problem that I was not able to solve yet. I have requested a SSL-certificate from my hoster. So far everything went fine. The problem is that the links to my CSS-files are set to http instead of https. That is why my blog is not displayed the way it should. You can compare that here:
http://www.schimanke.com and
https://www.schimanke.com. Now I wonder if there was a way to get both versions working and looking the same way. What do I have to do to accomplish that? Any ideas?
Thanks in advance,
Flo
Re: How do I get SSL working?
Posted: Mon Mar 09, 2009 10:51 am
by garvinhicking
Hi!
You can change your s9y configuration and set https:// as your base URL. Or you can enable the option "Autodetect HTTP hostname" that will automatically use HTTPs when you use that URL to enter your blog.
Regards,
Garvin
Re: How do I get SSL working?
Posted: Mon Mar 09, 2009 11:15 am
by schimanke
Hi Garvin,
that is what I already tried. Unfortunately the changes in base URL are not saved when I click the save-button though s9y tells me it was saved. But when I enter the configuration page again the base URL is set back to http://. Therefore the link to my CSS-files is still set to "
http://www.schimanke.com:443/index.php?/serendipity.css" when entering the site via https://. Could that be a bug? What can I do? Would you like to take a look at my installation?
Thanks for your help!
Re: How do I get SSL working?
Posted: Mon Mar 09, 2009 11:34 am
by garvinhicking
Hi!
That should not happen; which browser and which s9y version are you using? HAve a look inside the HTML sourcecode of the config page and see if the "selected" attribute really is not set for the option you set.
Anyhow. I tried your page, when I use "
http://schimanke.com" the CSS is properly linked to that domain. So I figure the option IS properly enabled, but https:// is not properly prefixed to your domain. Which webserver are you using? Lighttpd might not set the $_SERVER['HTTPS'] option that is required for s9y to detect whether HTTPS is used or not.
Regards,
Garvin
Re: How do I get SSL working?
Posted: Mon Mar 09, 2009 11:48 am
by schimanke
I am using s9y 1.4 and Firefox 3.0.7. When I look at the source code of the config page it also tells me that the base URL is set to http:// and NOT to https:// as I have entered it. So it seems that the config changes are not saved.
Yes, http://schimanke.com and http://www.schimanke.com work absolutely fine. The problem only occurs when using SSL. The blog is hosted at 1&1 and the webserver should be apache, which you can see here:
http://www.schimanke.com/info.php
Regards,
Flo
Re: How do I get SSL working?
Posted: Mon Mar 09, 2009 1:01 pm
by garvinhicking
Hi!
Your info.php reveals that $_SERVER['HTTPS'] is not set. S9y requires this field to be set (to the value "On" or "on"); usually Apache1+2 do set that env field. I cannot tell you why your server doesn't, maybe you can ask your technical support? This is really standard and is required for proper https usage.
schimanke wrote:I am using s9y 1.4 and Firefox 3.0.7. When I look at the source code of the config page it also tells me that the base URL is set to http:// and NOT to https:// as I have entered it. So it seems that the config changes are not saved.
Hm, changes should be saved when you get no error message. The actual values are stored in the serendipity_config database table.
Regards,
Garvin
Re: How do I get SSL working?
Posted: Mon Mar 09, 2009 2:53 pm
by schimanke
Okay, thank you! I will contact tech support at 1&1. Maybe they can solve this issue. I'll keep you up to date.
Anyway, the base URL settings are definatley not saved. The database still says http://. I tried to change it via phpMyAdmin directly but to no success. The database noe says https:// but on the config page is still http://. The page is still not diplayed properly with SSL.
Any more ideas?
Re: How do I get SSL working?
Posted: Mon Mar 09, 2009 3:49 pm
by garvinhicking
Hi!
Yeah, when you use the "Autodetect HTTP-Host" option, this will always overwrite your hostname with non-SSL, due to your $_SERVER['HTTPS'] variable not being set. Only if you disable "Autodetect HTTP-Host", s9y exactly shows you the one hostname you configured.
HTH,
Garvin
Re: How do I get SSL working?
Posted: Mon Mar 09, 2009 4:40 pm
by schimanke
Okay, there we have it. Thanks Garvin! Now it works with http:// as well as with https://. I set the the "Autodetect HTTP-Host" option to "no" and the base URL to https:// and now everything is working just fine. Thanks again!