I set up 2 new systems for us, a Nagios and a MediaWiki installation, both on separate virtual systems.
The nagios system on Apache works using a ScriptAlias directive and is available under
I've tried to set up a redirect from
nagios.ourdomain.com/nagios3. I found out that a redirect in the sites-available entry for the
*:80 virtual host redirected endlessly. In the documentation I found that the
Redirect directive takes precedence over a
ScriptAlias directive. I've solved this by allowing an override for the standard www serving directory (
var/www), then placing a
.htaccess into it with a
Redirect 301 / /nagios3
This works like a charm.
Now, with the wiki system, I want to do a similar redirect from
wiki.ourdomain.com/wiki, although the wiki already works calling the
/wiki url directly. The mediawiki installation is served directly from the standard wwwroot
/var/www by a symlink
/var/www/wiki pointing to the mediawiki directory.
Now, as before, I changed the
*:80 vhost directive, added the
<Directory /var/www> AllowOverride FileInfo </Directory>
and placed the .htaccess with the
Redirect 301 / /wiki
var/www. However, calling
wiki.ourdomain.com now redirects endlessly, always adding
/wiki to the URL.
For the nagios, I understood it was a problem of directive precedence. But with the mediawiki directory directly linked into the wwwroot of the server, I do not understand how the .htaccess of
/var/www can be used multiple times, if the first redirect already redirects to a subdirectory (although a symlinked one).
Is this a problem of the symlink? Am I doing the configuration wrong somehow? I will accept a solution of doing the redirect differently, although I'm interested in the problem itself.