Blog / Tech

Migrating WordPress from a shared hosting environment to a virtual private server

November 9, 2011

I was migrating this WordPress blog early this morning from Bluehost to a dedicated Rackspace Cloud Server that I’m already using for a web application I’m writing. It was almost painless! Just ran into a few minor post-migration issues.

The reason I’m migrating is mainly because I want more control, like being able to use my own self-signed SSL certificate without paying extra, for example. I figured since I’m getting very low traffic it really …

How to change the hostname of your Ubuntu server

November 9, 2011

This post is really more of a note to myself as I’m sure I’ll be doing this again. But hopefully someone else will stumble upon this and find it useful :).

I have a VPS hosted on Rackspace running Ubuntu 10.04 LTS server edition. I wanted to change the hostname as I originally named it the name of the application I was working on, but I’m now planning on using it for multiple things. I …

How to allow remote connections to your PostgreSQL 9.0 database server on Ubuntu 10.04 LTS

September 8, 2011

Change directory to /etc/postgresql/9.0/main and modify the following configs (I know you’re sick of hearing this, but I recommend you back up your original configs before making any changes):

postgresql.conf

In “Connections and Authentication” section:

From

#listen_addresses = 'localhost'
#password_encryption = on

To

listen_addresses = '*'
password_encryption = on

pg_hba.conf

From

host    all    all    127.0.0.1/32    md5
host    all    all    ::1/128         md5

To

host    all    all    0.0.0.0/0   md5
host    all    all    ::0/0       md5

Restart the ssh …

Errors when installing the Python ‘lxml’ library using pip on Ubuntu

August 28, 2011

I thought I’d post this here, this is the second time I ran into this issue on Ubuntu and forgot what I did the first time.

If you get errors about things missing when you do ‘sudo pip install lxml’ on Ubuntu, you’ll probably need to install the following development packages (source):

  • sudo apt-get install python-dev
  • sudo apt-get install libxml2-dev
  • sudo apt-get install libxslt1-dev

You may also want to do ‘sudo pip …

How to configure the ‘logging’ module using dictionaries in Python 2.6

August 21, 2011

The logging.config module was updated in Python 2.7 and included a function called dictConfig() which takes a dictionary as an argument used to configure the logging module.

I wanted to use this in my new project so I can keep all my configurations/settings in one Python file but we’re not ready to upgrade to Python 2.7 just yet. The good news is you can just get the dictconfig module on its own and add it …