1. See following tutorials:
a. http://drupal.org/node/43783
b. http://www.debian-administration.org/articles/136
2. Case where drupal is not installed into the apache document root, but rather in a subdirectory, it is necessary to so specify in two places:
1. /var/www/drupal/.htaccess
# Modify the RewriteBase if you are using Drupal in a subdirectory and
# the rewrite rules are not working properly.
RewriteBase /drupal
2. /var/www/dsn/sites/default/settings.php
/** * Base URL (optional).
* * If you are experiencing issues with different site domains,
* uncomment the Base URL statement below (remove the leading hash sign)
* and fill in the URL to your Drupal installation.
...
* * It is not allowed to have a trailing slash; Drupal will add it * for you. */
# $base_url = 'http://www.example.com'; // NO trailing slash!
$base_url = 'http://localhost/drupal';
If you’re running Apache2 on Debian stable, in order to install the rewrite module you simply need to:
# a2enmod rewrite
then follow directions and/or restart the webserver:
# /etc/init.d/apache2ctl restart
Then (if you are working with a subdirectory that is at the same time a symbolic link) edit /etc/apache2/sites-enabled/000-default or the appropriate configuratin file, and add:
Options +FollowSymLinks ### if necessary, may be there
AllowOverride All
so that the following section ends up looking something like the following:
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
# Uncomment this directive is you want to see apache2's
# default start page (in /apache2-default) when you go to /
#RedirectMatch ^/$ /apache2-default/
</Directory>
(by default it will say AllowOverride None which will not allow use of .htaccess to override directives).