SSL in Magento

Hi there, trying to set up ssl for Magento.
In Magento there is an option to use ssl only in frontend.
At clicking checkout the app changes to https:// thus keeping the website part quick and the checkout part secure.

However there does not seem to be an option in the Jumpbox to let the app switch between http/https, only ssl/no-ssl.

Is there a way to let this work with the jumpbox?

Thx,
Merijn

Couldnt help noticing your

Couldnt help noticing your problem. I faced the same situation a few weeks ago but then i decided to look for some professional help regarding magento development and that worked wonders for me.

Hi Merijn, Here's what you

Hi Merijn,

Here's what you need to do. The JumpBox should begin with SSL turned off. SSH in to the JumpBox, and run the following command. You will be prompted for your password:

sudo sed -i -e 's/" + magic_s + "//' /jumpbox/application_portal/privileged_scripts/ubuntu/app.rb

Now go into the admin portal and turn SSL on (using either "Use built in unique certificate" or "Custom certificate") in the administration portal. Then SSH in to the JumpBox, and run the following commands:

sudo ln -sf /etc/apache2/sites-available/default.off /etc/apache2/sites-enabled/000-default
sudo /etc/init.d/apache2 restart

Everything should now work as you want. Note that if you change the SSL option again, you'll need to rerun the second set of commands. There are some minor caveats which apply if you are using the JumpBox backup and restore feature:

First, if you make a backup from this modified JumpBox, and subsequently restore to it, you will need to re-run the second set of commands after the restore has completed.

Second, if you make a backup from this modified JumpBox, and subsequently restore to an unmodified JumpBox, you will have to go through this whole process again.

Bruce

hmmm

Hi Bruce, works flawlessly now, although I definately needed this tip to get it working in the end: http://www.magentocommerce.com/boards/viewthread/15366/
In Magento, both frontend and admin should have: secure URL's 'Yes'
Both basic-URL and Basic Link URL should contain the right URL.

Many thanks for making this work!

Offtopic: a restore of a backup before these changes gives me:
Error: undefined method `select_db' for nil:NilClass

Any ideas to get the backup restore working again?

That's a very strange error.

That's a very strange error. Just to be clear, you made a backup before performing the modifications I described, and when attempting a restore you see that error?

Bruce

Sorry for the late reply, (I

Sorry for the late reply, (I miss e-mail alerts for reactions on this forum, would be great to have here).
Yes, I performed the backup before all modifications. And on restoring I get this error.
I remember to have altered some root-passwords for getting phpmyadmin to run, can that be the problem?
Merijn

SSL in Magento

Yeah that would likely be a problem. Why don't you email support at jumpbox dot com and we will see if we can wrap this up a little quicker. The forums seem to cause too much back and forth.

Austin

Great idea

Yes, that's a great idea, I'll do that.
Thanks,
Merijn

That's a very strange error.

That's a very strange error. Just to be clear, you made a backup before performing the modifications I described, and when attempting a restore you see that error?

Bruce

Hi Merijn, The JumpBox for

Hi Merijn,

The JumpBox for Magento, for consistency with other JumpBoxes is configured to use either HTTP or HTTPS exclusively. It is possible to set up the configuration you describe, with a certain amount of effort. If you wish to go that route, you'll need to be comfortable SSHing into the JumpBox and tinkering with configuration files. Let me know if you want to go ahead with this.

Bruce

Hi Bruce, yeah, I would

Hi Bruce, yeah, I would really like to go ahead with this, because I need the shop to be both quick and secure.
Bit of a newbee on linux, but i'll found my way around using Putty in the beginning...
I will start with a backup of the VM I think ;-)
Thanks in advance.
Merijn