Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a apache proxy load balancer running. I have a domain registered to this lb. I am trying to make proxy redirect from to the backend and below is the virtual hosting.

<VirtualHost *:80>
<IfModule mod_proxy.c>

ProxyRequests Off
ProxyPreserveHost On
ProxyVia On

         <Proxy *>
                AddDefaultCharset off
                Order deny,allow
                Allow from all

ProxyPass /
ProxyPassReverse /

why ProxyPass / doesn't work why ONLY ProxyPass /mediawiki works which matching directory. Can't I make it work with above virtual hosting?

Once Again, how do I send all request from to with ONLY mod_proxy WITHOUT using Redirect, Rewrite, Alias. I also don't want to use the virtual hosting done for mediawiki on and so I don't want to proxypass / to virtual hosting on the backend as I have to register a domain for this backend, perhaps not required if has internal DNS server but I don't have internal dns running.

Anybody know how to do this with ProxyPass & ProxyPassReverse?. Thank you!

share|improve this question
up vote 0 down vote accepted

Can you clarify "doesn't work" - what happens when you have this config in place and try to request a page?

If I remember right, you'll need to change MediaWiki's configuration to work in the changed path, as it's very sensitive about those things. It needs to know where the root is, and right now, it's at /../ - which will certainly cause problems with resource loading.

You'll need to adjust the $wgScriptPath and $wgArticlePath config settings in LocalSettings.php, keeping in mind that this will break the communication of anything talking to the wiki server directly without using the proxy (any links, etc, pointing to /mediawiki/something). If anything does need to talk directly instead of through the proxy, then you'll need to make the paths match via both entry points.

share|improve this answer
I am getting error page page not found. And in the address it's changing to Directly is accessible and I think it changes the address location. – user53864 Feb 8 '12 at 0:41
Right - it's configured to do so. See the third paragraph of the answer. – Shane Madden Feb 8 '12 at 1:25
Is there any possible way having both accessing directly and also via proxy? – user53864 Feb 8 '12 at 1:35
@user53864 Yes; if you can make the paths match. Is there anything else on the server that mediawiki is running on, or can you just move it from /mediawiki/ to /? – Shane Madden Feb 8 '12 at 1:37
paths matching hmm.... if paths should match then no way other than doing virtual hosting on and so I should register one more domain. Probably virtual hosting with internal domains can do instead registering domain but I should have DNS installed and running but I don't have and it's cloud servers. Yes, there are other apps also running on Just wondering why proxypass redirect exactly like it's said with haproxy. – user53864 Feb 8 '12 at 3:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.