Category Archives: Server Admin

It Works!

After installing apache on the system for the first time, there will be an index.html file in your /var/www folder (Debian systems). The file is also located somewhere such as /usr/share/apache2/default-site/index.html. When displayed the content looks like this: It works! This is the default web page for this server. The web server software is running but no content has been added, yet. The content for the file is as follows: <html><body><h1>It works!</h1> <p>This is the default web page for this server.</p> <p>The web server software is running but no content has been added, yet.</p> </body></html>

Posted in Linux, Server Admin, Tech Tips, Web Development | Tagged , , | 1 Comment

Using Apple Remote Desktop On Mac OSX – Tutorial

Here is a brief tutorial on using Remote Desktop On Mac OS X Now there are sort of two “flavors of Remote Desktop” Remote Desktop Connection for Mac The first is for connecting to a PC / Windows Box from a Mac and it is called “Remote Desktop Connection” and has a file name Remote Desktop Connection.app All I’m going to say about this one is where to download it, because you probably already know how to use it (and there are a lot of guides out there). Apple Remote Desktop The Second is Called “Apple Remote Desktop” or “Apple Remote Desktop 3.5” and has a file name Remote Desktop.app This is the one we’ll be focusing on. The first step is to download it. The web page is here which is basically a link to the App Store. It costs about $80. After you download / install Using Apple Remote Desktop you will have a Remote Desktop management screen that looks something like this: Next, on the remote computers you want to observe / manage / control you will need to install the Apple Remote Desktop Client (version 3.5.3 linked). After installing the client on the remote machine, make sure to also set the remote desktop / remote management “Sharing” preferences in System Preferences: Now on your management computer you should see the remote computer show up in the Scanner tab of Remote Desktop – at this point you can “add it” so that it will show up in … Continue reading

Posted in Mac, Server Admin, Server Administration, Tech Tips | Tagged , , | Leave a comment

mod_auth_openid v0.6 on Ubuntu 12.04 for AuthOpenIDAXRequire

I believe the standard version of mod_auth_openid that comes with Ubuntun 12.04 precise pangolin is v0.5 This library is also known by the name libapache2-mod-auth-openid Make sure you have apxs2 installed: Apache Extension Tools (apxs / apxs2) apache extension tools apt-get install sudo apt-get install apache2-threaded-dev I didn’t have the time to finish editing this post to my liking, so I’m just adding my notes as-are: mod_auth_openid v0.6 on Ubuntu 12.04 with AuthOpenIDAXRequire sudo apt-get install apache2-threaded-dev AuthOpenIDAXRequire schema email http://openid.net/schema/namePerson/prefix http://openid.net/schema/namePerson/first http://openid.net/schema/namePerson/last http://openid.net/schema/namePerson/middle http://openid.net/schema/namePerson/suffix http://openid.net/schema/namePerson/friendly http://openid.net/schema/person/guid http://openid.net/schema/birthDate/birthYear http://openid.net/schema/birthDate/birthMonth http://openid.net/schema/birthDate/birthday http://openid.net/schema/gender http://openid.net/schema/language/pref http://openid.net/schema/contact/phone/default http://openid.net/schema/contact/phone/home http://openid.net/schema/contact/phone/business http://openid.net/schema/contact/phone/cell http://openid.net/schema/contact/phone/fax http://openid.net/schema/contact/postaladdress/home http://openid.net/schema/contact/postaladdressadditional/home http://openid.net/schema/contact/city/home http://openid.net/schema/contact/state/home http://openid.net/schema/contact/country/home http://openid.net/schema/contact/postalcode/home http://openid.net/schema/contact/postaladdress/business http://openid.net/schema/contact/postaladdressadditional/business http://openid.net/schema/contact/city/business http://openid.net/schema/contact/state/business http://openid.net/schema/contact/country/business http://openid.net/schema/contact/postalcode/business http://openid.net/schema/contact/IM/default http://openid.net/schema/contact/IM/AIM http://openid.net/schema/contact/IM/ICQ http://openid.net/schema/contact/IM/MSN http://openid.net/schema/contact/IM/Yahoo http://openid.net/schema/contact/IM/Jabber http://openid.net/schema/contact/IM/Skype http://openid.net/schema/contact/internet/email http://openid.net/schema/contact/web/default http://openid.net/schema/contact/web/blog http://openid.net/schema/contact/web/Linkedin http://openid.net/schema/contact/web/Amazon http://openid.net/schema/contact/web/Flickr http://openid.net/schema/contact/web/Delicious http://openid.net/schema/company/name http://openid.net/schema/company/title http://openid.net/schema/media/spokenname http://openid.net/schema/media/greeting/audio http://openid.net/schema/media/greeting/video http://openid.net/schema/media/biography http://openid.net/schema/media/image http://openid.net/schema/media/image/16×16 http://openid.net/schema/media/image/32×32 http://openid.net/schema/media/image/48×48 http://openid.net/schema/media/image/64×64 http://openid.net/schema/media/image/80×80 http://openid.net/schema/media/image/128×128 http://openid.net/schema/media/image/160×120 http://openid.net/schema/media/image/320×240 http://openid.net/schema/media/image/640×480 http://openid.net/schema/media/image/120×160 http://openid.net/schema/media/image/240×320 http://openid.net/schema/media/image/480×640 http://openid.net/schema/media/image/favicon http://openid.net/schema/timezone via http://stackoverflow.com/questions/7403536/list-of-available-attributes-for-http-axschema-org-and-http-schemas-openid-n changeset on openid auth schemas http://sourceforge.net/apps/trac/simpleid/changeset/459 openid auth properties http://openid.net/specs/openid-attribute-properties-list-1_0-01.html Introduction : The Apache OpenID Module http://findingscience.com/mod_auth_openid/ AuthType OpenID require valid-user AuthOpenIDTrusted ^https://www.google.com/accounts/o8/ud AuthOpenIDSingleIdP https://www.google.com/accounts/o8/id AuthOpenIDAXRequire email http://openid.net/schema/contact/email [email protected] AuthOpenIDAXUsername email via http://mmornati.tumblr.com/post/23559005172/apache-and-mod-auth-openid-on-f16-centos openid explained http://openidexplained.com/use myopenid https://www.myopenid.com Using Mod_auth_openid With Ubuntu SSO http://rtg.in.ua/blog/2011/11/modauthopenid-and-ubuntu-sso/ sudo apt-add-repository ppa:rye/ppa sudo apt-get update sudo apt-get install libapache2-mod-auth-openid apt-cache policy libapache2-mod-auth-openid libapache2-mod-auth-openid: Installed: 0.6-0ubuntu1 Candidate: 0.6-0ubuntu1 Using Apache2’s mod_auth_openid… http://hustoknow.blogspot.com/2012/05/setting-up-google-apps-single-sign-on.html sudo apt-get install automake sudo apt-get install autotools-dev sudo apt-get install libtool sudo apt-get install libtidy-dev sudo apt-get install libcurl4-openssl-dev sudo apt-get install libopkele-dev ./autogen.sh ./configure make <location “/”> LoadModule authopenid_module /usr/lib/apache2/modules/mod_auth_openid.so AuthType OpenID require valid-user AuthOpenIDTrusted ^https://www.google.com/accounts/o8/ud … Continue reading

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

Why not to use 1and1 for hosting

And this is why I don’t think of 1and1 as a serious company for web hosting:

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

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

STOMP Server

A STOMP Server is a “Streaming Text Oriented Messaging Protocol” server. A STOMP Server provides an interoperable wire format that allows STOMP clients to talk with any STOMP Message Broker supporting the protocol. STOMP is thus language-agnostic, meaning a broker developed for one language or platform can receive communications from client software developed in another language. From wikipedia

Posted in Server Admin, Server Administration, Software, Web Development | Tagged , | Leave a comment

AWS Marketplace Launches

The other day I was looking at the Bitnami stacks and was thinking how incredible it is that you can create an amazon AMI image and share, deploy, and instantly launch a web server. This has interesting repercussions for software and copyright holders, imagine installing a licensed operating system like Redhat or Microsoft Windows and then giving hundreds of thousands of others the ability to instantly clone it. Oops. Amazon Web Services is pleased to announce AWS Marketplace, an online store where customers can find, buy, and quickly deploy software that runs on AWS. AWS Marketplace includes pay-as-you-go products, free software (AWS infrastructure fees still apply), and hosted software with varied pricing models. CA Canonical Couchbase Check Point IBM Microsoft SUSE Red Hat SAP Many widely used open source offerings, including WordPress Drupal MediaWiki This certainly will make software as a service companies and providers – I’m thinking cheap web hosting for wordpress, for example, have to take another look at their product / services model and pricing tiers. You’ll be charged for what you use, by the hour or month, and software charges will appear on the same bill as your other AWS services. When you find the software you’d like to purchase, you can use AWS Marketplace’s 1-Click deployment to quickly launch pre-configured server images, or deploy with familiar tools like the AWS Console.

Posted in Linux, Marketing, Server Admin, Server Administration, Software, Tech Opinion | Tagged , , , , | Leave a comment

fix “max_allowed_packet” on MySql

MySQL Error 1153 – Got a packet bigger than ‘max_allowed_packet’ bytes To fix this I ran these two commands in mySQL before executing the queries that were giving me the error message about the max allowed packet bytes. set global net_buffer_length=1000000; set global max_allowed_packet=1000000000;

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

nagios check_dns / check_ip example

Need to monitor an IP address / DNS entry with Nagios? Nagios has a plugin called check_dns just for that. The check commands are defined in this file: /etc/nagios-plugins/config/dns.cfg # ‘check_dns’ command definition define command{ command_name check_dns command_line /usr/lib/nagios/plugins/check_dns -H www.google.com -s ‘$HOSTADDRESS$’ } # ‘check_dig’ command definition define command{ command_name check_dig command_line /usr/lib/nagios/plugins/check_dig -H ‘$HOSTADDRESS$’ -l ‘$ARG1$’ } here is an alternate version I wrote to check the IP of a host, I could have used check_ip because I don’t think that command is taken, but instead I used my_check_dns: #my_check_dns command, checks to make sure a hostname resolved to a specified IP address: define command { command_name my_check_dns command_line /usr/lib/nagios/plugins/check_dns -H $ARG1$ -a $ARG2$ } this is how it would be implemented in a service: define service{ use generic-service ; Name of service template to use host_name mysite.com service_description check dns check_command my_check_dns!www.mysite.com!123.456.78.90 } Man Page: check_dns v1.4.14 (nagios-plugins 1.4.14) Copyright (c) 1999 Ethan Galstad <nagios @nagios.org> Copyright (c) 2000-2008 Nagios Plugin Development Team <nagiosplug [email protected]> This plugin uses the nslookup program to obtain the IP address for the given host/domain query. An optional DNS server to use may be specified. If no DNS server is specified, the default server(s) specified in /etc/resolv.conf will be used. Usage:check_dns -H host [-s server] [-a expected-address] [-A] [-t timeout] [-w warn] [-c crit] Options: -h, –help Print detailed help screen -V, –version Print version information -H, –hostname=HOST The name or address you want to query -s, –server=HOST Optional DNS server you … Continue reading

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

Woo Themes and Affiliate Link Structure

Recently received an error from Woo. It’s below, and it has some unique insights to how the database and affiliate tracking is done. Database Error Database Error A database error occurred while performing the requested procedure. Please review the database error below for more information. system/libraries/drivers/Database/Mysql.php [371]: There was an SQL error: Duplicate entry ‘9802422’ for key 1 – INSERT INTO `wm_affclick` (`aff_id`, `url`, `remote_addr`, `referrer`, `woo_product`, `is_unique`) VALUES (‘123456’, ‘http://www.woothemes.com/extension/google-product-feed/’, ‘123.45.67.89’, NULL, ”, 0) Stack Trace system/libraries/drivers/Database/Mysql.php [99]:Mysql_Result->__construct( ) system/libraries/Database.php [259]:Database_Mysql_Driver->query( INSERT INTO `wm_affclick` (`aff_id`, `url`, `remote_addr`, `referrer`, `woo_product`, `is_unique`) VALUES ('123456', 'http://www.woothemes.com/extension/google-product-feed/', '123.45.67.89', NULL, '', 0) ) system/libraries/Database.php [962]:Database_Core->query( INSERT INTO `wm_affclick` (`aff_id`, `url`, `remote_addr`, `referrer`, `woo_product`, `is_unique`) VALUES ('123456', 'http://www.woothemes.com/extension/google-product-feed/', '123.45.67.89', NULL, '', 0) ) application/models/affiliatestats.php [138]:Database_Core->insert( wm_affclick, Array ( [aff_id] => 123456 [url] => http://www.woothemes.com/extension/google-product-feed/ [remote_addr] => 123.45.67.89 [referrer] => [woo_product] => [is_unique] => 0 ) ) application/helpers/log.php [95]:AffiliateStats_Model->create( Array ( [aff_id] => 123456 [url] => http://www.woothemes.com/extension/google-product-feed/ [remote_addr] => 123.45.67.89 [referrer] => [woo_product] => [is_unique] => 0 ) ) application/controllers/go.php [124]:log_Core->add_affclick( 123456, http://www.woothemes.com/extension/google-product-feed/ ) Go_Controller->index( ) system/core/Kohana.php [291]:ReflectionMethod->invokeArgs( Go_Controller Object ( [uri] => URI Object ( ) [input] => Input Object ( [use_xss_clean:protected] => 1 [magic_quotes_gpc:protected] => 1 [ip_address] => ) [session] => Session Object ( [input:protected] => Input Object ( [use_xss_clean:protected] => 1 [magic_quotes_gpc:protected] => 1 [ip_address] => ) ) ) ) Kohana::instance( ) system/core/Event.php [209]:call_user_func( Array ( [0] => Kohana [1] => instance ) ) system/core/Bootstrap.php [55]:Event::run( system.execute ) index.php [106]:require( system/core/Bootstrap.php )Loaded in 0.0088 seconds, using 1.13MB of memory. Generated by Kohana v2.3.4.

Posted in Server Admin, Web Development | Tagged , , , | 1 Comment