How to install and configure WordPress hosted on Nginx with PHP-FPM on Debian based distros

Nginx is an open source web server. Users have been moving to Nginx because of the high performance and stability and as of February 2014, Nginx is hosting around 15% of all web servers according to Netcraft’s Web Server Survey. Nginx is a great option for hosting WordPress sites.

It’s assumed that you have already installed Nginx with PHP-FPM. If you haven’t already done that, you can use this tutorial: How to install Nginx with PHP and MySql support on wheezy

1. Create the database for WordPress

mysql -u root -p
CREATE DATABASE {database};
CREATE USER {username}@localhost;
GRANT ALL PRIVILEGES ON {username}.* TO {database}@localhost IDENTIFIED BY '{password}';
FLUSH PRIVILEGES;
exit

Continue reading

Hobbit doesn’t recognize last apt-get update

After installing the hobbit-plugins package, all my lenny servers were marked red on the hobbit server and the error message was: “Last apt update: 175.7 day(s) ago”.

The reason is that the hobbit-client relies on the file: /var/lib/apt/lists/lock but apt isn’t updating that anymore.

To fix this I created a cron job to update apt-get every night and update the /var/lib/apt/lists/lock file (crontab -e)

0 4 * * * /usr/bin/apt-get update 1>/dev/null && touch /var/lib/apt/lists/lock