developing smarter web applications...

Apache

Redirect traffic from a wordpress site

The Problem:

A wordpress site has depreciated and you want to redirect all of its traffic to a landing page on a new site.

The Solution:

You should explain to the user why they are being redirected, so create a page on the old wordpress site at some url, say: www.oldsite.com/we-moved

On that new page (/we-moved), we want it to have a countdown and then redirect to the new landing page at, say: www.newsite.com/welcome-oldsite

To do the redirect, put the following jQuery/javascript on the 'we-moved' page:

  

Secure push and pull with git-http-backend

I am setting up a new repository machine for my code. I will be setting it up with Active Directory later on, but I figured my basic setup would be a good starting point for most people.

My new repo box is on CentOS. I installed Git on my server from the EPEL repository. All the commands in this tutorial will be done from sudo.

I created a simple password file on my server using this command.
htpasswd -c path/to/file/passwords user-name

To add a user to the existing password file do:

Apache, MySQL and PHP on Snow Leopard

Snow Leopard comes with PHP 5.3 installed by default. Since I do a lot of Drupal development, I can't actually use that version of PHP and I needed to downgrade to PHP 5.2.x. I personally do not like the way that Apple has setup their AMP stack, so this is how I was able to get an acceptable one setup.

Note: This method uses MacPorts, so you will need to install that first.

sudo port clean php52
sudo port -f uninstall installed
sudo port installed
sudo port install grep
sudo port install apache2

Installing Django with Satchmo on Debian Etch

This is how I got Django and Satchmo set up on my Debian Etch box with Apache2, MySQL, mod_python and Memcached.

The machine I started with had Debian Etch installed as well as Apache2 and MySQL.

Debian Rails Stack - NginX and Mongrel

If you are reading this it is because you already know that you want a Rails setup on a Debian server with NginX in front of a Mongrel Cluster.

These are the steps I used to completely set up my server...

Drupal Clean Urls on Debian LAMP Stack

Clean Urls did not work out of the box for me when I installed Drupal on a fresh install of Debian. These are the easy steps for setting them up.

Enable mod_rewrite:
You need to enable the rewrite module so Apache can do the rewrite. On Debian you can issue the following command to do this.

$ a2enmod rewrite

 
Syndicate content