Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We're deploying a SpringMVC application and using an Apache frontend to make it easier to for our less technically inclined employees to upload images in to the application without having to redeploy the application and such annoyances; it also handles our SSL so that our SSL deployment can be easily standardized.

To that end, we're using an Apache2 frontend sitting on :443 which handles SSL, and splicing in data from our CMS to this end:

ProxyPass /client-ui/images/rich/ !
Alias /client-ui/images/rich/ /var/lib/cms/images/

as well as something like

<Location /client-ui/>
        ProxyPass http://localhost:8080/client-ui/ timeout=3600
        ProxyPassReverse http://localhost:8080/client-ui/
</Location>

One thing which our deployment hasn't managed to take care of yet is that the application lives on /client-ui/betptc/home so when someone visits the site they have to hit example.com/client-ui/betptc/home. I'd like to set up a DirectoryIndex on / that simply redirects to the main application.

However, if I do a bang'd ProxyPass like I do with the images directory, the entire domain gets kept from proxying to Tomcat; the /client-ui/ block isn't recognized or respected.

Is there any other way to do that? I don't know our Spring application very well, so I'm hesitant to explore adding the redirect on that end, but if there's a way to do it there I'm open to it.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Why not just..

RedirectMatch permanent ^/$ http://example.com//client-ui/betptc/home

But exempting the proxy will work too.

ProxyPassMatch ^/$ !

(that would need to go above your existing ProxyPass lines, since they're processed in order)

share|improve this answer
    
These both work, thanks, Shane! –  Ryan Rix Nov 20 '12 at 10:36

Your Answer

 
discard

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.