Report this

What is the reason for this report?

SSL on single page with WordPress one-click install

Posted on June 18, 2014

Hey. I’ve created a droplet with the WordPress one-click install on Ubuntu 14.04.

I’m running an e-commerce site and I’m hoping to secure the checkout page with SSL.

I’ve found <a href=“https://www.digitalocean.com/community/tutorials/how-to-create-a-ssl-certificate-on-apache-for-ubuntu-14-04”>this tutorial</a>, but it seems to be for securing an entire site, which I don’t want to do.

I’m hoping to use the WordPress HTTPS plugin to secure just checkout page, so the SSL security needs to optional - all of the site will be accessed using http://, except for the one page in question which will be accessed via https://.

Anyone have any ideas? This is new to me, I’m competent but not when it comes to securing the site via SSL. Sorry if I’ve missed anything! :)



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Am not an Apache user but I think this should work. First generate your certificate and since your own an e-commerce website I suggest you use startssl.com. See here how to for the certificate: https://www.digitalocean.com/community/tutorials/how-to-create-a-ssl-certificate-on-apache-for-ubuntu-12-04 Then create your .htaccess and add this <pre>RewriteEngine On RewriteBase /

force https

RewriteCond %{HTTPS} =off RewriteRule ^(checkout|cart).php$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]</pre>

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.