Top Nav

Archive | Uncategorized

Install Scalr Command Line Utilities on CentOS 6.4

For managing cloud clusters we love Scalr both as a hosted service and using the open-source self-hosted version. One of the best features is the easy to install and use command line utilities.

Here are the docs:

Here’s the install steps for CentOS 6.4:

1. Install python setuptools package:

2. Install python scalr package:

3. Run scalr configure to setup access credentials. See the docs for details but something like this:

And now your ready to go.








Find Malware Hidden In Image Files

Hackers will often try to hide malicious code in files with image extensions like “.gif”. Here’s a command line that will help identify suspicious files:

Not every file returned in this scan is malware. Pay special attention to files of type text. It’s not unusual to see an image file where the file extension does not match the content – so a .png file might actually contain a JPEG file.


SVN – Show Changed Files Between Revisions

To get a list of files changed between two revisions in subversion use this command:

Replace [RNUM1] and [RNUM2] with the revision numbers. [RNUM2] can be HEAD for the most recent version.


RackSpace Cloud Server With Multiple SSL Certificates

A recent configuration issue that we encountered involved trying to host multiple SSL enabled websites on a RackSpace Cloud Server with RackConnect. Each cloud server get’s only a single IP address but SSL requires each site to have a separate IP address. The work around then is to use a RackSpace Cloud Load Balancer to route additional IP addresses to the the cloud server on alternate ports. So for example if we have a cloud server at

a. points to on the load balancer with the backend node configured to route to

b. points to on the load balancer with the backend node configured to route to

b. points to on the load balancer with the backend node configured to route to

Now this looks like it should work. On the cloud server we just have to configure each of the virtual hosts to listen on the appropriate port.

But there is a catch, the ServerName in each virtual host must be in the form “” … including the port number. Then when the server get’s a request like this where “admin” is a directory:

It tries to redirect to:

This is the “trailing slash redirect” provided by mod_dir. The problem is Apache can’t for a proper self referencing URL because the ServerName includes the port number.

The solution we found for this problem is to bind the virtual host to a private address on the loopback interface and then frontend the instance with a virtual host using mod_proxy.

Here’s how it works:

a. the real virtual hosts are bound to 127.0.0.x addresses

Site A-Real goes on
Site B-Real goes on
Site C-Real goes on

b. the proxy virtual hosts are bound to the actual network interface:

Site A-Proxy goes on
Site B-Proxy goes on
Site B-Proxy goes on

Here’s a template for the real site config:

And here’s the proxy config:


Plesk – Howto Clear Hung Database Copy

Recent versions of Plesk include a “Make a Copy” feature for databases. Unfortunately, on occasion the copy will fail but the copy task will not be removed. Then you’ll see a message like this every time you go to the affected database in Plesk.

You can view a list of the current tasks with the following command from a root ssh login:

You can clear the task by running the following command: