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

This is the situation:

Server A hosts "http://internal.intranet"

Server B hosts the internal application on "http://servernameb.intranet/foo/bar"

Server A needs to redirect all incoming http trafic to the adress of server B without users noticing it.

I can easly do this with the following config file:

  ServerName internal.intranet
  ServerAlias internal

  RewriteEngine on

  # Deny TRACE/TRACK request methods
  RewriteRule .* - [F]

  #RewriteRule "^/files(.*)$" "/files$1" [L]

  # Everything else not matched above needs to go to the servlet container
  # via HTTP listening on port 8008. The [P] flag (which is required)
  # implies that our requests will be handled by mod_proxy.
  RewriteRule "^/(.*)" "http://servernameb.intranet:8080/foo/bar/$1" [P]

But then the problem is that the url shown in the users browser is: http://servernameb.intranet..... instead of http://internal.intranet

I don't want the users to get in contact with the servernameb address.

I know I probably need to use ProxyPass and ProxyPassReverse but i just can't get it to work.

share|improve this question

you should try the following:

  ServerName internal.intranet
  ServerAlias internal

  ProxyPass        /  http://servernameb.intranet/foo/bar/
  ProxyPassReverse /  http://servernameb.intranet/foo/bar/
share|improve this answer

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.