Solved

A document root per virtual host

Posted on 2003-10-25
5
982 Views
Last Modified: 2013-12-10
I need WAS to use one set of html/jsp files when hitting one virtual host and another set when hitting another, e.g.
www1.mydomain.com/myApp -> /www1 files
www2.myDomain.com/myApp -> /www2 files
The context root has to be identical for both, if not I'd have made two webapps with each their document root, but WAS will not accept multiple webapps with the same context root.

So the question is whether and how it is possible to deploy my application so the document root is dependent on the virtual host.

Thanks!
0
Comment
Question by:nesrohtretep
  • 3
  • 2
5 Comments
 
LVL 8

Expert Comment

by:fozylet
ID: 9623757
Inside the launch page you could check for the server address and redirect/forward accordingly.

the server address will be in the HTTP Server Variable HTTP_HOST
0
 

Author Comment

by:nesrohtretep
ID: 9623952
Yes that it possible, but I'd rather not have that logic in my application, I'd prefer to have it in the deployment information if possible. It is a plan B though.

0
 

Author Comment

by:nesrohtretep
ID: 9623969
My problem could also be solved by convincing WAS to allow two webapps with the same context root but different virtual hosts, is that possible?
0
 
LVL 8

Expert Comment

by:fozylet
ID: 9624489
Haven't tried anything like that and can't really try right now. Sorry.
0
 

Accepted Solution

by:
nesrohtretep earned 0 total points
ID: 9629515
I solved the problem.
It was caused by my virtual hosts having an overlap in the defined aliases. When I removed the overlap, WAS accepted multiple webapps with identical context roots, with each their document root.
Thanks for your suggestion fozylet
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Verbose logging is used to diagnose garbage collector problems. By default, -verbose:gc output is written to either native_stderr.log or native_stdout.log.   It is also possible to redirect the logs to a user-specified file. This article will de…
This exercise is about for the following scenario: Dmgr and One node with 2 application server. Each application server contains it owns application. Application server name as follows server1 contains app1 server2 contains app1 Prereq…
A short film showing how OnPage and Connectwise integration works.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now