We currently have an internal site set up for IT at
it.example.com, which hosts a single Redmine site.
I want to set up Apache so that if a user goes to
kb.example.com it redirects them to
http://it.example.com/some/path/to/knowledge-base as a shortcut.
I added a
<VirtualHost> at the end of my httpd.conf, and now whenever I try to hit the main site (it.example.com) the browser goes into an infinite redirection loop:
Here is my
LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-4.0.37/buildout/apache2/mod_passenger.so <IfModule mod_passenger.c> PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-4.0.37 PassengerDefaultRuby /usr/bin/ruby </IfModule> ServerName it.example.com ServerAdmin firstname.lastname@example.org DocumentRoot /var/www/redmine-2.4.3/public ErrorLog logs/redmine_error_log SetEnv RAILS_ENV production SetEnv RailsEnv production #If you are using mod_fcgid and are going to upload files larger than #131072 bytes you should consider adding the following line #that allows to upload files up to 20 mb MaxRequestLen 20971520 <Directory "/var/www/redmine-2.4.3/public"> Options Indexes ExecCGI FollowSymLinks -MultiViews Order allow,deny Allow from all AllowOverride all </Directory> <VirtualHost *:80> ServerName kb.example.com Redirect / http://it.example.com/projects/knowledge-base </VirtualHost>
So it looks like the VirtualHost is being ignored and the rules for kb.example.com are ALWAYS in effect - thus causing the infinite redirect...