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 have a Jira and a Confluence system at my work. Both are running on the same servers. The actual URL to access Jira and Confluence are:

http://foauslxapp05:8080/jira
http;//foauslxapp05:8090/confluence

or with the fully qualified host name:

http://foauslxapp05.foservices.corp:8080/jira
http://foauslxapp05.foservices.corp:8090/confluence

To simplify everything, I've setup a proxy rule to allow users to do this:

http://foauslxapp05/jira  <-- Accessing Jira
http://foauslxapp06/wiki  <-- Accessing Confluence

Our techs have created pair of server aliases for foauslxapp05, so that:

http://jira/jira     <-- Accessing Jira
http://jira.foservices.corp/jira  <-- Accessing Jira
http://wiki/wiki     <-- Accessing Confluence
http://wiki.foservices.corp/wiki  <-- Accessing Confluence

What I'd really like to do is take this to the next step:

http://jira    <-- Accessing Jira
http://jira.foservices.corp  <-- Accessing Jira
http://wiki    <-- Accessing Confluence
http://wiki.foservices.copr  <-- Accessing Confluence

The problem, of course, is that the DNS names jira and wiki are merely DNS aliases for foauslxapp05. I need to detect the URL that the user entered (i.e. what host the user requested), then based upon that URL, I need to redirect the user to the correct application.

I'm not even too sure what I should be looking at: Is this VirtualHost? mod_rewrite? mod_proxy? Or, is this something else entirely. I can't imagine something like this being too difficult to do. Unfortunately, I'm just not too familiar with Apache httpd.

share|improve this question
    
Can you clarify how your proxy configuration is set up now? Maybe provide that <VirtualHost> block? –  Shane Madden Apr 24 '12 at 16:13
add comment

1 Answer

You can do this by using the ServerAlias variable in your virtual host configuration, this configuration item can support a list of server names/aliases:

http://httpd.apache.org/docs/2.0/vhosts/name-based.html

share|improve this answer
add comment

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.