Tag Archives: ssl

Nagios: Monitor SSL Certs

Nagios has the ability to monitor SSL certificates for expiration. Here’s how to do it: Steps for Nagios to Monitor SSL Certs Download the check_ssl_certificate plugin from the nagios exchange site Update:A better / updated version of the plugin is available for download here ( it is mentioned on previously mentioned nagios plugins page ) Installation: Edit the script, replacing the line: use lib “/usr/lib64/nagios/plugins”; with the path to your nagios plugins directory (where utils.pm is located). For me on Ubuntu 10.04 this was use lib “/usr/lib/nagios/plugins”; Also edit the line: my $openssl = “/usr/bin/openssl”; with the path to your openssl binary. Then copy the script into your nagios plugins directory, for Ubuntu 10.04 it was /usr/lib/nagios/plugins I also updated line 155 – 158 of the script, because it has a bug that allows expired certificates to show up as passing: if ($daysLeft < 0) { print “$PROGNAME: CRITICAL – $cn expired ” . abs($daysLeft) . ” day(s) ago.\n”; exit $ERRORS{‘CRITICAL’}; } elsif ($daysLeft <= $critical) { The key part is adding in this line: exit $ERRORS{‘CRITICAL’}; To monitor a site, you will need to set up a configuration, using something like this (edit to suit your needs): define command { command_name check_ssl_certificate command_line /usr/lib/nagios/plugins/check_ssl_certificate -H $HOSTNAME$ } define service{ use generic-service host_name www.yoursite.com service_description check ssl check_command check_ssl_certificate contact_groups admins }

Posted in Server Admin, Server Administration | Tagged , , , | Leave a comment

Google Search Lucky

Google’s “I’m Feeling Lucky” search in Google Chrome Do you want to use Google’s “I’m Feeling Lucky” search in Google Chrome? It’s easy using the custom search engines. In Google Chrome click the wrench icon and then choose prferences next click manage custom search engines Inser the string(s) below and a name (pretty much irrelevant) and they shortcut keyword you want to use. I use > Google Search Lucky Strings Standard “Im Feeling Lucky” Search http://www.google.com/search?q=%s&btnI=Im+Feeling+Lucky SSL Encrypted “Im Feeling Lucky” Search https://www.google.com/search?q=%s&btnI=Im+Feeling+Lucky Note: I’ve stripped out all items such as encoding and referrer to keep this as clean and simple as it can be. Now you can simply type in something like > Google Docs into your browser bar and have it go to the first result – which is most likely the right place.

Posted in Mac, Software, Tech Tips, Web Development | Tagged , , , , , , , , , , | 2 Comments

Fix “Post Types Order” plugin error with HTTPS

The WordPress Plugin Post Types Order by NSP CODE is helpful in as it allows you to Order Posts and Post Types Objects using a Drag and Drop Sortable javascript capability But unfortunately the plugin does not work with wordpress HTTPS / SSL admin – or at least not without errors: But the good news is that there is an easy fix with changing just a few lines of code: At the top of the post-types-order.php page there are two constant definitions: define(‘CPTPATH’, ABSPATH.’wp-content/plugins/post-types-order’); define(‘CPTURL’, get_option(‘siteurl’).’/wp-content/plugins/post-types-order’); And the second one needs to use the plugins_url() function that WordPress recommends instead: define(‘CPTPATH’, ABSPATH.’wp-content/plugins/post-types-order’); define(‘CPTURL’, plugins_url().’/post-types-order’); After that you should stop receiving the HTTPS error for some insecure content when you are in the WP administration interface.

Posted in Tech Tips, Web Development | Tagged , , , , , | Leave a comment

Shopify: Disable HTTPS pages from being indexed by Google

Add this somewhere in the  <head></head> area of your theme.liquid file: {% capture protocol %}{{ “reset.css” | asset_url | truncate: 5,” }}{% endcapture %} {% if protocol == “https” %}<meta name=”robots” content=”noindex, follow” />{% endif %}

Posted in Web Development | Tagged , , , | Leave a comment

cURL via SSL return http_code 0 (WAMP)

I was having some trouble on a WAMP installation when trying to cURL an encrypted site over port 443. The cURL response was not helpful at all, it was as follows: [url] => https://encrypted.google.com/ [content_type] => text/plain;charset=utf-8 [http_code] => 200 [header_size] => 229 [request_size] => 170 [filetime] => -1 [ssl_verify_result] => 0 [redirect_count] => 0 [total_time] => 0.027 [namelookup_time] => 0 [connect_time] => 0.002 [pretransfer_time] => 0.004 [size_upload] => 0 [size_download] => 227 [speed_download] => 8407 [speed_upload] => 0 [download_content_length] => 227 [upload_content_length] => 0 [starttransfer_time] => 0.027 [redirect_time] => 0 After quite a bit of researching, I found that the problem was related to checking the certificate. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); The aforementioned fix works, but it is sort of quick-and-dirty. If you’d like to know the proper way to fix this, you’d need to use the CURLOPT_CAINFO option. See this post for details.

Posted in Web Development | Tagged , , | Leave a comment

Disable IIS SSL (Port 443)

c:\inetpub\adminscripts>adsutil set w3svc/1/securebindings “::” then do a iisreset.

Posted in Tech Tips, Web Development | Tagged , , | Leave a comment