Installer SSL på dit Surftown hostede domæne

Nu hvor Facebook kræver at ens Facebook sides iframe canvas loader via SSL (fra 1.okt 2011) har jeg haft en lille øvelse for recreative.dk som skulle overgå til SSL. (dvs. HTTPS).

Surftown har naturligvis nogle udemærkede vejledninger som kan følges til de indledende øvelser. Men jeg konstaterede at det var svært at forstå hvordan “INTERMEDIATE CA” skulle installeres, mest fordi der åbenbart benyttes forskellige termer om nogle af de “keys” man får i forbindelse med bestilling / installation af SSL.

Jeg er ingen ekspert i SSL, og på den baggrund er det måske også sjovere at gå igang med opgaven – skulle der være en fejl, eller nogle tekniske termer jeg har misforstået så sig endeligt til. Hovedsagen for mig er at løsningen virker. :)
NB: Jeg har skiftet surftowns kontrolpanel SPROG ud til ENGELSK.

Sådan gjorde jeg for at installere “DNS Validated” SSL på et domæne hostet ved surftown erherv.

1: Dit domæne skal have egen IP adresse.
Dette tilbydes kun til Surftown ERHVERV kunder.
Se vejledning “Hvordan får jeg en dedikeret ip adresse

2: Installer et temporert certifikat via surftowns kontrolpanel.
Se vejledning: Hvordan bestiller jeg SSL certifikat.
(husk at notere indholdet ned i et text dokument!)

3: På dit domæne som skal have SSL, opret email adressen “hostmaster@dit-domæne.dk”
Se vejledning: Hvordan opretter jeg en email adresse

4: Afvent at DNS for din nye IP adresse er slået igennem
– Ja der KAN gå 24 timer, så sov på det! Utålmodighed er ikke din ven. Du kan ikke fremprovokere en hurtigere løsning ved at skrive til surftown support – det er DNS servere rundt omkring i verden som også skal opdateres.
– VIGTIGT: kontroller at du kan MODTAGE email til den nye “hostmaster@dit-domæne.dk” adresse

5: Bestil dit eget certifikat
Jeg benyttede GratisDNS.dk til at bestille mit SSL (RapidSSL 2 år)
Nu hvor jeg har haft mere tid til at kigge mig omkring, ville jeg nok vælge The SSL Store som har samme varer bare billigere :)
Jeg bestilte “RapidSSL” altså UDEN Wildcard. Du skal indtaste din “hostmaster@dit-domæne.dk” som modtager af certifikatet. Og du skal bruge ØVERSTE del af den information du fik i 2 (altså den del som indeholder “BEGIN CERTIFICATE REQUEST”).
Når købs ordren er gennemført vil du modtage en email, hvor du validerer at du har købt et SSL certifikat, og at dette er din email. Herefter vil du modtage endnu en email med selve certifikatet!

6: Installer dit eget certifikat!
Og det er så her hvor Surftowns vejledning ikke stemmer – dvs følg IKKE denne vejledning: Hvordan installerer jeg mit SSL certifikat
I stedet for at følge surftowns egen vejledning (du skal IKKE disable/slette nuværende certifikat), så skal du…
a) Log på surftown kontrolpanelet.
b) Vælge “domæne Indstillinger”.
c) I domæne listens venstre side klik på pågældende domæne.
d) Udfor “SSL Support” trykker du på “Edit SSL” (på hammeren)
e) I feltet “Certificate Chain File” skal du copy/paste indholdet i “INTERMEDIATE CA” fra din email!
– husk at trykke “INSTALL”
f) I feltet for “Install Certificate based on previously generated Certificate request” copy/paster du indholdet i “Web Server CERTIFICATE” – husk at trykke “UPLOAD”

7: Verificer at certifikatet virker
– eller se hvad der mon er galt ved at benytte FairSSL.dk’s udemærkede test værktøj!
Hvis FairSSL’s værktøj viser en fejl med dit “chain” certifikat, kan du logge på RapidSSL’s hjemmeside, og få en udviddet udgave. – åben .pem filen i en tekst editor og benyt denne (som har 2 områder med krypteret indhold) i feltet beskrevet i punkt 6,e).

8: Når du har SSL installeret…
– Og hvis du benytter WordPress, så læs videre her Tips til WordPress og SSL HTTPS

Skriv kommentar

Din e-mailadresse vil ikke blive publiceret. Krævede felter er markeret med *

Another WordPress IE issue fixed, 404 pages not working

So Im happily putting into production a nice newsletter plugin on a customer site.
Its AJAXed, got virtual page for email-response clicks and all..

To my horror the 404 pages on the customer site are displaying non graphical, text only Internet Explorer messages on the virtual page – actually any 404 pages..

I did not detect this behavior with my local IE_Tester, only the live site with the specified browser (IE 6.something) seem’d to have this issue of not letting the 404 pages resolve. (before you moan, Its impossible to upgrade browser or try another on this customer!)

I checked the PHP settings (mod_rewrite was working fine), apache server dident have anything obscure or errors popping out…

The fix. Insert this at the very top of header.php in the WordPress theme


Tip about this obtained from http://www.newnine.com/blog/47-wordpress-404-errors-in-ie

(for those worrying that this will set quirks mode – just make sure theres no spaces before the DOCTYPE)

And this really did the trick. Now WordPress allways return a page status 200 to the browser, and the build in global $wp_query; WordPress functionality will controls the error messages as expected.

Skriv kommentar

Din e-mailadresse vil ikke blive publiceret. Krævede felter er markeret med *

WordPress ajax SACK dosent work for IE6

I have a big customer who uses IE6 as a platform. The last couple of days I have had my troubles working out why the described methods for doing ajax in WordPress with SACK dosent swing it..

Yes I can make it do Ajax, but having custom returnmessages (a requirement for user interaction) seems to fail on “eval(this.response)”

Yawnn..

While doing a signup for weekly digests, I have now combined various techniques to make
– a fake WordPress page – only vievable when a visitor clicks a mail response link.

– ajax the button for “confirm” or “unsubscribe” and if the clicked link dident return a known record – display form for submitting an email and “signup”
The Ajax were needed to update the database with the new status of the click, and to return a message like “thanks – blablabla..”

This is actually the second time I waste hours trying to understand why SACK dont work, If you stumble upon this, and are trying to figure out how to do AJAX and WordPress, read this brilliant tutorial: http://wpleet.com/wordpress-ajax-jquery-practice-using-shortcode

Im using it slightly differently, but that in essence is the way to do it.

Skriv kommentar

Din e-mailadresse vil ikke blive publiceret. Krævede felter er markeret med *

Using wordpress shortcodes anywhere

WordPress shortcodes are normally only displayed when the_content() is being fired.

You can however, if you know the shortcode and its parameters, paint it anywhere you like on your WordPress website. Its not practical to use for all plugins, as alot of them uses a referance to the post they are supposed to represent. (normaly the_content() is part of the loop).

Do this to display a shortcode anywhere on your WordPress site, this example will show the subscribe2 plugin signup form with only the “subscribe” button:

Often you need to take care that the plugin’s shortcode can be used like this – does it depend on a post_id, does it need to return stuff to the screen after a form has been submitted and so on..

Skriv kommentar

Din e-mailadresse vil ikke blive publiceret. Krævede felter er markeret med *

WordPress 3 Comment formatting and styling

Content to the templatefile, in the theme directory comments.php

One “aber dabai” is that I moved the $req asterix (*) besides the label Name/Email/Website and removed the “required” span class. And the extra class can mess up the absolute position for the name, and then the asterix.

I did this becourse I like to use the jQuery infieldLabel plugin to move the input label inside the input field.

Further more, I like to use a ajax comment plugin like: ptm-ajax-comments

Styling the commentform

Styling the commentlist:

Enjoy

Skriv kommentar

Din e-mailadresse vil ikke blive publiceret. Krævede felter er markeret med *

A few favorite WordPress Plugins

I do develop my own functions and plugins, but for some tasks there are really nice plugins in the WordPress repository that will do the job awsomely or better.

These are WordPress plugins that I use now and then…

 

Gallery

http://wordpress.org/extend/plugins/nextgen-gallery/
NextGen is a really well done, has a huge userbase and is thusfar the most throughoutly tested and used plugin for galleries. Almost all WordPress users run into this plugin at some point. I think its great but still its not the lightest on ressources for your installation.

http://wordpress.org/extend/plugins/lazyest-gallery/
A great alternative to NextGen gallery

http://wordpress.org/extend/plugins/magic-gallery/
I can see this one getting more and more support

 

Media Player and Viewers

http://wordpress.org/extend/plugins/shadowbox-js/
Great for displaying images and content inside modalboxes.

http://wordpress.org/extend/plugins/media-element-html5-video-and-audio-player/
Awsome video plugin!

http://wordpress.org/extend/plugins/wpaudio-mp3-player/
The most smooth way of adding your own mp3 files to a post – its beautifull and effective!

http://wordpress.org/extend/plugins/soundcloud-shortcode/
Soundcloud is an online music sharing site. Soundcloud hosts your files and you can create playlists of your tracks. Then share them on your site with this easy to use plugin!

http://wordpress.org/extend/plugins/soundcloud-is-gold/
Another soundcloud.com plugin – this is really cool for setting player settings without handwriting options to control stuff like width and colors.

 

Social plugins

http://wordpress.org/extend/plugins/embed-facebook/
When you want to display stuff from Facebook; pictures (albums), events, group pages.

http://wordpress.org/extend/plugins/facebook-comments-for-wordpress/
Great when it comes to letting facebook users write comment on posts or pages.

http://wordpress.org/extend/plugins/share-and-follow/
Adding Share and Follow when you want a floating bar on the right side, Insert a “like” box or any other sharing platforms out there.. this plugin does the trick really well.

http://wordpress.org/extend/plugins/sharebar/
Makes it really easy to add a sharebar that follows the page down when the visitor scrolls on a long page.

 

Caching

http://wordpress.org/extend/plugins/hyper-cache/
I have become a fan of this plugin for its simplicity and ease of use – and for one special feature, disable caching on certain areas!

http://wordpress.org/extend/plugins/w3-total-cache/
W3 Total Cache is the prefered plugin when I do caching.

http://wordpress.org/extend/plugins/wp-super-cache/
Super Cache is equally good.

http://wordpress.org/extend/plugins/flexicache/
FlexiCache is a close runnerup. I like it but I still prefere W3-Total-Cache.

 

Backup

http://wordpress.org/extend/plugins/updraft/
Simply amazing backup plugin – I did a few tweaks to include custom tables and a dashboard notification. You can save files locally, FTP them to an offsite location and on a CDN.

 

User Rating

http://wordpress.org/extend/plugins/gd-star-rating/
Whenever you want to let users rate posts, pages or comments with stars, hearts or give the thumbs up!

http://wordpress.org/extend/plugins/wp-postratings/
The more simple version of a rating system, this one only for posts.

 

Other

http://wordpress.org/extend/plugins/skeleton-key/

Skriv kommentar

Din e-mailadresse vil ikke blive publiceret. Krævede felter er markeret med *