2

we've got a small problem which I want to discuss here.

We have one virtual machine in which JIRA and Confluence are installed. JIRA and Confluence are entered in the DNS list, so the users can arrive the server just by entering "jira" or "confluence" in browser - what allready works.

We configured apache to forward the requests to two different pathes in httpd.conf:

<VirtualHost *:80>
    ServerName crucible
    ServerAlias crucible
    RedirectPermanent / https://machine/crucible
  </VirtualHost>

  <VirtualHost *:80>
    ServerName confluence
    ServerAlias confluence
    RedirectPermanent / https://machine/confluence
</VirtualHost>

then, we configured proxy_ajp for SSL comunication - what also allready works:

#JIRA
ProxyPass               /jira       ajp://jira:8009/jira
ProxyPassReverse        /jira       https://jira:8009/jira

#Confluence
ProxyPass               /confluence       ajp://confluence:8011/confluence
ProxyPassReverse        /confluence       https://confluence:8011/confluence

The only problem that we have is that the URL shows the exactly path to to the page, which is of course the right one :

http://jira/jira/...
http://confluence/confluence/...

Is there a possibility, or an example how to shorten up the urls to get rid of these doubled jiras and counfluences?

Java_Waldi
  • 924
  • 2
  • 12
  • 29

1 Answers1

0

Convert the first argument to the proxy directives to just /, add trailing slashes to the second arguments. You can also lose the redirect at that point.

If there is limited content that should not be proxied, you can use the ! syntax in the ProxyPass manual to make exceptions.

This will cause you to drop the /jira/ on the redirects.

If you have URL's out in the wild, you may want to use mod_rewrite to silently strip off these prefixes e.g.

RewriteEngine ON
RewriteRule ^/(?:jira|crucible)(/.*) $1 [PT]
covener
  • 17,402
  • 2
  • 31
  • 45