LanceLHoff to the rescue again: virtualappliances.net Apache2 Wordpress permalink issue fix

Twice in a week, now, the tips at LanceLHoff.com have come to my rescue.

I was just banging my head against some Apache2 configuration issues with the (really cool) virtualappliances.net Ubuntu-based LAMP stack VM… Permalinks support in Wordpress 2.6 was broken and nothing I tried in my httpd.conf or .htaccess files would make it work. Then I found this useful little piece:

http://www.lancelhoff.com/2008/04/04/how-to-make-wordpress-permalinks-work-in-xampp/

While this was written for the XAMPP stack for Windows, I was able to infer from it what I needed to fix the permalink problem I was having. A somewhat tweaked version of the instructions from LanceLHoff.com follow.

    1. Make sure mod_rewrite is enabled. In /etc/apache2/mods-enabled, create a symbolic link called rewrite.load that points to ../mods-available/rewrite.load .  
    2. Look at the end of the /etc/apache2/apache2.conf file. You will see the line:Include /etc/apache2/sites-enabled/

      This tells you that you should look in the sites-enabled directory for separate configuration files for your virtual hosts on the VM. I didn’t know this.

    3. Look in /sites-enabled for the symlink named 000-default. This really points to the file ../sites-available/default, so edit that file. (You can edit this using the symbolic link as well, but that’s slightly less obvious– symlnks make my brain hurt.)
    4. Search the file for AllowOverride until you come to a section that looks like the following:

       DocumentRoot /var/www/html
       
               Options FollowSymLinks
               AllowOverride all
       
               Options Indexes FollowSymLinks MultiViews
               AllowOverride none
      Order allow,deny
               allow from all

      Change the AllowOverride none to AllowOverride All. Make sure that Indexes and FollowSymLinks are present in the Options list.

    5. Save the file and Restart your apache2 server.apache2 -k restart

    Now your Wordpress permalink settings should work. Thanks again to LanceLHoff!