• Apache redirect for wildcard domains

    We recently had to redirect a wildcard domain to another wildcard domain using Apache redirects. It is assumed you have already enabled mod_rewrite, if not make sure you enable that apache module before you try adding this rule.
    Read the rest of this entry »

    Share
  • Simple Setup of SSL on Apache with mod_ssl and OpenSSL

    This is a very simple way of setting up Apache with SSL from a trusted Certificate Authority(CA), just follow these steps and you will have it running in no time. I am assuming you have all the prerequisites installed, Apache with mod_ssl enabled and OpenSSL. I add the following to the server configuration (either httpd.conf or apache2.conf) so it knows to listen on port 443, you can do this in the virtual host file if you wish:

    <IfModule mod_ssl.c>
    NameVirtualHost *:443
    </IfModule>

    The next thing you will want to do is create an RSA key for your server. There are 2 ways to do this you can do it so that Apache will require a password at startup/restart, or you can do it without this added encryption. If you choose not to use encryption, you should make sure you protect this key as much as possible! Rename domainname with your actual domain name you want to secure.
    Read the rest of this entry »

    Share
  • Setting Up Ubuntu for Rails Development

    These are a the procedures we use to setup a PC or VM for development of a ruby on rails application.

    First things first, get your install software ready.  These instructions are based on the Hardy Heron version of Ubuntu (8.04).

    Install the base OS and then fire up the terminal so you can copy and paste the following commands. 

    So once you have the base installed, make sure your distribution is up to date:

    sudo apt-get update
    sudo apt-get dist-upgrade

    Read the rest of this entry »

    Share
  • Mongrel Gem and Paperclip Plugin Problems

    This problem occurred when setting up a site using mongrel along with the paperclip rails plugin. After about a week of normal operation we started having lots of problems with the automated image resizing required by the rails application.

    It was running along and generating all the images just fine, then all of a sudden it stopped processing the ‘large’ images or made them blurry, and we started seeing the following in the application logs:

    Paperclip::NotIdentifiedByImageMagickError: /folder/stream.####.# is not recognized by the 'indentify' command.
    

    This is a very strange problem since the development environments work just fine and the developers were insistent that the server was the problem and not the code, as they usually do.
    Read the rest of this entry »

    Share
  • Costs Using Amazon EC2 & S3

    Figuring out all the costs when hosting on EC2 using S3 storage can be tricky. This is break down of what you can approximately expect to pay using a few basic scenarios, such as a lamp server and S3 backups, with Amazon services. This will also compare the costs to what you would expect to pay if you want to do the hosting yourself.

    To fully understand EC2 charges, you need to know the difference between the instance types and what they cost to best meet your requirements. For the purpose of this post I will summarize – I have converted the Amazon Compute Units into basic CPU power and will then detail the costs based upon each of these instances.
    Read the rest of this entry »

    Share