skip to Main Content

Hoping someone can give me some advice if possible.

We have a Linux box in our DMZ with the WebSphere plugin. This points to a Windows box running WebSphere Application Server.

httpd config only contains the default virtualhost with no ServerAlias specified. There is a redirect set up in the virtualhost in httpd.conf to forward any requests to service.domain.com to service.domain.com/wascontext1. Plugin-cfg.xml is set up with two uri groups, wascontext1 and wascontext2, but only 1 is actively used.

I want to use the Linux box as a reverse proxy for another application totally separate to WAS. It would have a different domain (i.e. dimsim.domain.com) but point to the same IP.

I was going to add another virtualhost for this but am unsure exactly how the WebSphere plugin will behave with it. From what I understand if I set this up and went to dimsim.domain.com/wascontext1 it would serve the WebSphere content as httpd forwards all requests to the plugin.

Is there a way to tell httpd to not send requests to the WebSphere plugin based on domain name or virtualhost? Or would doing a rewrite on any requests to dimsim.domain.com/wascontext be considered ok?

thanks

jc

EDIT: Thanks for the responses! I’ll test changing the virtualhost name in plugin-cfg.xml on our second unused context and let you know how it goes.

4

Answers


  1. Chosen as BEST ANSWER

    Sorry for the late response.

    covener's answer of setting the following does what I need.

    SetEnvIf Host ^dimsim.domain.com$ skipwas=1
    

  2. If you look at the plugin-cfg.xml file, in the first part of the file you will find virtualhostgroup section similar to this:

    <VirtualHostGroup Name="default_host">
      <VirtualHost Name="*:9080"/>
      <VirtualHost Name="*:9443"/>
      <VirtualHost Name="*:443"/>
      <VirtualHost Name="*:80"/>
    </VirtualHostGroup>
    

    just change the Name from * to the required domain name e.g. service.domain.com and then plugin will forward only requests for the service.domain.com hostname.

    So something like:

    <VirtualHost Name="service.domain.com:80"/>
    

    should work for you.

    Login or Signup to reply.
  3. When a request comes into the web server, it is passed to the WebSphere plugin and then plugin examines the request based on its configuration to determine if it should forward to WebSphere or pass back to the web server for further processing.

    The “route” clauses in the plugin-cfg.xml are key to determining what will be forwarded and what will not. A request must match all the values in the route to be forwarded. A route contains virtual hosts, uris and clusters. The request must match one a virtual host from the VirtualHostGroup in the route, a URI from the UriGroup in the route and there must be an available server in the ServerCluster value of the route for the request to be sent to WebSphere.

    Note-If you manipulate your plugin-cfg.xml for your setup, be aware that plugin is very sensitive about the format of this configuration and incorrect or invalid entries could cause a crash of the webserver. Be sure to backup the file and test before using in production. Also, if you modify your WebSphere configuration, it could overwrite this file and wipe out your changes.

    Login or Signup to reply.
  4. A solution that doesn’t require plugin-cfg.xml changes: If you use an Apache-based HTTP server, you can conditionally set the per-request variable “skipwas” to short-circuit the WAS Plugin processing.

    e.g.

    SetEnvIf Host ^dimsim.domain.com$ skipwas=1
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search