Blog / Howto

How to configure Nginx so you can quickly put your website into maintenance mode

April 6, 2014

I had to rebuild my Rackspace VPS last night where my Django app runs as I wanted to downgrade it because it was underutilized. Since I was already at the lowest tier for that category of servers, there's no option to resize it down, I would need to spin up a new server from a different server category.

Thanks to Ansible, though, provisioning a new server with all the applications and configurations I needed …

Django Tip: How to configure Gunicorn to auto-reload your code during development

March 30, 2014

I just finished fully automating my entire server stack for my Django app with Ansible and Vagrant (using VirtualBox). One of the reasons I did this is to make my development environment as close to production as possible to hopefully eliminate any surprises when deploying to production. It also allows me to setup a development environment very quickly as I won’t have to deal with manual installation and configuration of different packages. In a team …

How to find out which web server a website is using with Telnet

March 24, 2014

Here’s a quick and easy way to figure out what kind of web server a website is using with good, old telnet. I like this method as most operating systems (both old and new versions) have a telnet client already installed.

Steps:

1. Open a command/terminal window.

2. Telnet to the server/website on port 80, e.g.

telnet www.glucosetracker.net 80

3. Type the following once you’re connected:

HEAD / HTTP/1.0

4. Hit the Enter key …

Using Highcharts with Django 1.6 and Bootstrap 3

December 13, 2013

I was looking for a library to create charts to use for my Django app about a week ago and a friend suggested to try Highcharts as he had heard good things about it from fellow Python/Django developers.

Highcharts is a charting library purely written in JavaScript. The charts look really pretty and interactive. Using the library is quite easy, too, thanks to the well written documentation with lots of examples. You can view a …