UI application is not opening with VIP URL but UI application is working as expected with Apache HTTPD URL

387 views Asked by At

Earlier we had 1 vm where apache httpd (Loadbalancer) is running to loadbalannce our UI application which is deployed on weblogic managed servers in cluster with multiple instances. We can able to access UI with server A loadbalancer ip and in the backend httpd is calling weblogic managed servers.

Now we are trying to implement VIP based approach for the high availability of loadbalancer service (apache httpd) running on server A and server B. Currently VIP C is getting resolved to corresponding VMs i.e. server A or server B. However if we are hitting VM related URLs on browser it is navigating to SSO i.e. Siteminder Authenticaon Page but the same is not being achieved via VIP URL i.e. http://ip-of-c/ . We assume there might be some extra parameter needed on actual VMs apache httpd configuration so that URL http://ip-of-c/ can navigate to SSO page. Below is the error we are getting while hitting VIP URL http://ip-of-c/.

Not Found The requested URL /test was not found on this server.

http://ip-of-c/ - VIP URL (Not working)
http://ip-of-a/ - 1st LB URL (Working)
http://ip-of-b/ - 2nd LB URL (Working)

Tried to change Listen section with VIP on actual vms but no luck.

1

There are 1 answers

6
Nic3500 On BEST ANSWER

In /etc/hosts on all servers and clients, or in DNS

1.1.1.1     ip-of-a             # Server A
2.2.2.2     ip-of-b             # Server B
3.3.3.3     ip-of-c             # VIP
3.3.3.3     www.exemple.com     # OR can be defined in DNS

On Server A:

<VirtualHost *:80>
    ServerName  www.exemple.com
    ServerAlias serverA.domain
    # Logs configuration
    # DocumentRoot
    # DocumentIndex
    # ... other configurations ...
</VirtualHost>

On Server B:

<VirtualHost *:80>
    ServerName  www.exemple.com
    ServerAlias serverB.domain
    # Logs configuration
    # DocumentRoot
    # DocumentIndex
    # ... other configurations ...
</VirtualHost>

To access the site via the VIP, use http://www.exemple.com To access the site only on server A, use http://serverA.domain To access the site only on server B, use http://serverB.domain

Avoid accessing directly via IP, it breaks the domain name mechanism that Apache uses to select VirtualHost.

This works with static sites. Your Weblogic servers must accept requests with all 3 names for it to respond correctly.