1

I'm using CentOS 5.5 and Apache 2.2. I just started to administrate my own dedicated server, but I think that I understand the concept of virtual hosts in Apache: I actually have to different domains (lets call em: www.myDomain1.com and www.myDomain2.com) that are both served by my server.

Now I want to use Mediawiki and would like to use it with the following Url: www.myDomain1.com/wiki. How to I do that? As far as I understand, virtual hosts are only for complete domains, but I only want "www.myDomain1.com/wiki" to serve my wiki-webpage. Here are some important information:

  • DocumentRoot is "/var/www"
  • "/var/www" contains three more folders: myDomain1, myDomain2, Mediawiki
  • I use the Kohana Framework on both domains, which usually catches all requests and wants to map them to one of its contollers
Nemo
  • 259
  • 1
  • 13
paskster
  • 301
  • 5
  • 12

1 Answers1

0

Apache is very flexible and there are multiple choices of how to do this:

  1. In /var/www, create a symlink so that wiki is an alias for Mediawiki. `ln -s /var/www/Mediawiki /var/www/wiki
  2. Alias /wiki /var/www/Mediawiki in your apache config (inside the virtualhost). This is primarily intended for things outside the document root (/var/www), but works inside, too; and it's both fast and simple.
  3. mod_rewrite. Very flexible, can do a lot of things. Also complicated.

    RewriteEngine On
    RewriteRule ^/wiki(.*)$ /Mediawiki$1

freiheit
  • 14,544
  • 1
  • 47
  • 69