BuddyPress -- Pages failing to load (404)

I was going insane working on a buddypress install for our intranet's tech-blog because every page I attempted to load into Wordpress following the Buddypress install resulted in a 404 error.

Eventually, after several (re)installs, I tracked the issue down to a mod_rewrite issue.  Because I'm using sub-directories through a <directory> tag in my apache configuration, my .htaccess file looks different from the normal WP/BP installations:

[codesyntax lang="bash" lines="no" tab_width="4"]

# BEGIN WordPress
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /techblog/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /techblog/index.php [L]
</IfModule>

[/codesyntax]

I kept mucking about in this file thinking that there was something in my configuration that was incorrect causing me to 404 whenever I left the main page.

My boss inserted an error into the .htaccess file and, when we reloaded the page, we didn't generate a 500 error -- the site's main page loaded, but the sub-pages were still broken.  That we injected an intentional error and the page loaded indicated that mod_rewrite was ignoring .htaccess and so the problem had to be further up in the food chain.

My <directory> alias was incorrect in two places:

[codesyntax lang="bash" lines="no"]

Alias /techblog /var/www/techblog

<Directory "/var/www/techblog">
    Options Indexes MultiViews
    Order allow,deny
    Allow from all
</Directory>

[/codesyntax]

First, I learned that you have to explicitly state AllowOverride All -- the default setting was: AllowOverride None.  Which tells Apache to ignore the .htaccess file.  Deleting that line from my configuration did not have the anticipated effect of telling Apache to not ignore the .htaccess file; you must explicitly state AllowOverride All.

The second thing I learned was that you have to add FollowSymlinks to the Options directive so that your permalinks will be honored.  My configuration file now looks like this:

[codesyntax lang="bash"]

Alias /techblog /var/www/techblog

<Directory "/var/www/techblog">
Options Indexes MultiViews FollowSymlinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>

[/codesyntax]

When I restarted Apache, the BP site correctly loaded the sub-pages without error.