I am having problems with the configuration of Websphere. I am using IBM HttpServer and Webshere Application Server 5.
I think this should be really easy to do - I can do this when using Tomcat. I want to setup 2 web sites. I have 2 application already running on Websphere Application Server. I want to setup a url e.g. www.test.co.uk and have this "pointing" to my first application e.g. myapp1 I want to setup a url e.g. www.test2.co.uk and have this "pointing" to my second application e.g. myapp2 Can anybody help me with this? Surely someone has setup 2 web sites on a system that uses the http server and the application server.
Yes both web sites point to port 80 of the server. In Tomcat you can set up 2 different virtual hosts. Each virtual host has a different "docbase" (as it is in Tomcat - Document Root in the IBM Http Server). By doing this the first virtual host will route all requests for www.test.co.uk to a particular application and the second virtual host will route all requests for www.test2.co.uk to a different application. I have this setup and working in a production environment with standalone Tomcat BUT how can this be achieved in the IBM HttpServer / Websphere. Surely somebody out there has setup 2 different web sites on the same server ? Rufus by needing the application context (xxx) then a user wishing to get to a web site would have to put www.test.co.uk/xxx into the browser ? This is not very practical and it is like setting up Google to be www.google.co.uk/myapp ?? [ April 16, 2004: Message edited by: Davie Ali ]
Yes I know about the virtual hosts in the httpd.conf file - the question is if you wish to setup one of these virtual hosts in this file what should the Document Root be set to when you are wishing to "point" it to an application on the application server [ April 18, 2004: Message edited by: Davie Ali ] [ April 18, 2004: Message edited by: Davie Ali ]
I honestly don't think it matters what the doc root is set to. The WAS plugin will intercept all URL's bound for it without regard to the document root -- now if you want to host static content outside WAS, you'll need to set these to point to the directories holding that content, of course. Kyle
Well I have tried it and it does not work. Maybe I need some fixpack or something. Kyle I tried the context root set to "/". But I cannot set two application's context roots to this unless they are in a different virtual hosts in the application server.
Yes, that's how it works -- the combination of virtual host and context root is used to determine what application to route the request to. But I thought that's what you were trying to do? If you do set up two virtual hosts in the app server, and in the web server it should route requests for "vhost1/" to application 1 and "vhost2/" to application 2. Isn't that what's happening? Kyle
Kyle - so to confirm you are saying to set up 2 virtual hosts in the app server each virtual host has one application in it with a context root "/"? I DO NOT have to do anything in the IBM HttpServer as the plug-in will take care of it. Is this correct?