Solved

A document root per virtual host

Posted on 2003-10-25
5
986 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 DevOps Pipeline Leaking?

Is your CI/CD pipeline a hodge-podge of randomly connected tools? You’ve likely got a tool to fix one problem & then a different tool to fix another, resulting in a cluster of tools with overlapping functionality. Learn how to optimize your pipeline with Gartner's recommendations

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Weblogic server  backup 5 112
method inner class 6 83
constructor overloading 2 96
Logs to delete in Windows VCenter server ? 11 1,299
-Xmx and -Xms are the two JVM options often used to tune JVM heap size.   Here are some common mistakes made when using them:   Assume BigApp is a java class file for the below examples. 1.         Missing m, M, g or G at the end …
Upgrading Tomcat – There are a couple of methods to upgrade Tomcat is to use The Apache Installer is to download and unzip and run the services.bat remove|install Tomcat6 Because of the App that we are working with, we can only use Tomcat 6.…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

751 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