I have 2 sites setup to running from same drupal (4.6.1) codebase, one of which is in a subdirectory.
www.example.com and www.example.com/site2
/etc/apache/conf/vhosts/vhosts.conf
<VirtualHost *>
ServerName example.com
ServerAlias www.example.com
DocumentRoot /var/www/example.com
#Setenv VLOG /var/log/apache2/example.com
<Directory /var/www/example.com>
AllowOverride All
Order allow,deny
Allow from all
</Directory>
Alias /site2 /var/www/example.com
</VirtualHost>
Important details from /var/www/example.com/sites/example.com/settings.php
$db_url = 'mysql://apache:*******@localhost/example';
$base_url = 'http://www.example.com';
Important details from /var/www/example.com/sites/example.com.site2/settings.php
$db_url = 'mysql://apache:*******@localhost/site2';
$base_url = 'http://www.example.com/site2';
I can enable clean urls in the first site www.example.com and it works just fine.
However if I try to enable clean urls for www.example.com/site2 I'm informed;
It appears your host is not configured correctly for Clean URLs. Please check for ModRewrite support with your administrator.
How do I fix this?
Reading http://drupal.org/node/9909 suggest to edit the .htaccess file and do;
# Modify the RewriteBase if you are using Drupal in a subdirectory and the
# rewrite rules are not working properly: