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'm trying to setup a redirect to https on a specific ServerName but before it does the redirect I'd like it to match a Location path and reverse proxy to a separate server rather than redirect to the https URL. Below is how I thought it would work but it seems that it redirects before doing the reverse proxy. Clearly my apache skills are lacking. Maybe, I need two separate VirtualHosts? Any help would be appreciated.

<VirtualHost *:80>
    <Location /console>
    <Location />
        Redirect permanent /
share|improve this question
Do you want the Redirect to happen for everything not in /console, then? Or just for the / location? – Shane Madden May 24 '13 at 2:15
Redirect everything that isn't /console. To add to that if it is /console reverse proxy to web application console aka Weblogic console. – Gareth May 24 '13 at 8:15
up vote 0 down vote accepted

Instead of letting the Redirect config apply for all locations, let's avoid applying it for /console. Remove the <Location /> section and replace it with:

<LocationMatch "!^/console">
    Redirect permanent /
share|improve this answer
So you are saying I can do this? <VirtualHost *:80> ServerName <Location /console> ProxyPass ProxyPassReverse </Location> <LocationMatch "!^/console"> Redirect permanent / </LocationMatch> </VirtualHost> Stupid comments don't handle formatting well. – Gareth May 28 '13 at 14:10
@Gareth Right, that should have the Redirect take effect for all locations that aren't /console – Shane Madden May 28 '13 at 21:55

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.