UI 应用程序未使用 VIP URL 打开,但 UI 应用程序使用 Apache HTTPD URL 按预期工作

发布于 2025-01-17 00:12:36 字数 705 浏览 3 评论 0原文

早些时候,我们有 1 个虚拟机,其中运行 apache httpd(负载均衡器)来负载平衡我们的 UI 应用程序,该应用程序部署在具有多个实例的集群中的 weblogic 托管服务器上。我们可以使用服务器 A 负载均衡器 ip 访问 UI,并且在后端 httpd 正在调用 weblogic 托管服务器。

现在我们正在尝试实现基于 VIP 的方法,以实现在服务器 A 和服务器 B 上运行的负载均衡器服务 (apache httpd) 的高可用性。当前 VIP C 正在解析到相应的 VM,即服务器 A 或服务器 B。但是,如果我们正在访问 VM浏览器上的相关 URL 导航到 SSO,即 Siteminder Authenticaon 页面,但无法通过 VIP URL 即 http://ip-of-c/ 实现相同的功能。我们假设实际虚拟机 apache httpd 配置上可能需要一些额外的参数,以便 URL http://ip-of-c/ 可以导航到 SSO 页面。以下是我们在访问 VIP URL http://ip-of-c/ 时遇到的错误。

未找到 在此服务器上找不到请求的 URL /test。

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

尝试在实际虚拟机上使用 VIP 更改监听部分,但没有成功。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

忘东忘西忘不掉你 2025-01-24 00:12:36

在所有服务器和客户端上的 /etc/hosts 中,或在 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

在服务器 A 上:

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

在服务器 B 上:

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

要通过 VIP 访问站点,请使用 http://www.exemple.com
要仅访问服务器 A 上的站点,请使用 http://serverA.domain
要仅访问服务器 B 上的站点,请使用 http://serverB.domain

避免直接通过 IP 访问,这会破坏Apache 用于选择 VirtualHost 的域名机制。

这适用于静态站点。您的 Weblogic 服务器必须接受具有所有 3 个名称的请求才能正确响应。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文