i've a working Redmine-instance at /var/lib/redmine. (Redmine configuration is not the issue)
ln -s /var/lib/redmine/public /var/www/redmine
chown -R www-data:www-data /var/www/redmine
echo "RailsBaseURI /redmine" > /etc/apache2/sites-available/redmine
a2ensite redmine
service apache2 restart
Tested with via http://here.comes.my.ip/redmine ... works fine for a test.
But i have complacations with my servername to folder mapping (rewrite) and passenger.
Here my default virtualhost (yes - everything in one vhost cause of OneSSLCertPerIP)
<VirtualHost *:80>
ServerAdmin admin@example.de
DocumentRoot /var/www
RewriteEngine on
RewriteMap lowercase int:tolower
RewriteCond %{REQUEST_URI} !^/cgi-bin/
# map servername to folders
RewriteCond ${lowercase:%{SERVER_NAME}} ^[a-z0-9_-]+\.[a-z]+$
RewriteRule ^(.+) ${lowercase:%{SERVER_NAME}}$1 [C]
RewriteRule ^([a-z0-9_-]+)\.([a-z]+)/(.*) /var/www/$2/$1/default/$3
RewriteCond ${lowercase:%{SERVER_NAME}} ^[.a-z0-9_-]+\.[a-z0-9_-]+\.[a-z]+$
RewriteRule ^(.+) ${lowercase:%{SERVER_NAME}}$1 [C]
RewriteRule ^([.a-z0-9_-]+)\.([a-z0-9_-]+)\.([a-z]+)/(.*) /var/www/$3/$2/v+$1/$4
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
These RewriteRules maps example.de to /var/www/de/example/default and sub.example.de to /var/www/de/example/v+sub
So well (mapping works) so bad (call of redmine via passenger not):
ln -s /var/lib/redmine/public /var/www/de/example/v+redmine
chown -R www-data:www-data /var/www/de/example/v+redmine
[...]
service apache2 restart
[...] can be replaced with several tries to place RailsBaseURI with different folders for /redmine on different positions in /etc/apache2/sites-available/default
Result: http://redmine.example.de/ - There is just a directory listing instead of redmine.
Additional Info: OS: Ubuntu-server Oneiric