【问题标题】:Page not loading with ip address页面未使用 IP 地址加载
【发布时间】:2012-05-15 05:11:33
【问题描述】:

我有一个 webserver 正在运行 apache and tomcat as apache as front end。问题是当我给出页面正在加载的域的 url 时。但是当我在地址栏中提供 ip 时,它没有加载。以下是我在 apache 中的配置。

<VirtualHost 192.168.1.98:80>
   JkWorkersFile /etc/httpd/conf.d/workers.properties
   JkLogFile /var/log/httpd/mod_jk.log
   JkLogLevel info
   JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
   JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
   JkRequestLogFormat "%w %V %T"
   JkMount /* worker1
</VirtualHost>

为什么我在浏览器中输入192.168.1.98 时它没有加载?
它给出了一个空白页。 帮助

【问题讨论】:

  • 如果我在 Windows 主机文件中提供 ip -> 主机名,则站点正在加载,但我希望在通过 IP 地址访问时加载此站点。有什么想法吗?
  • 好的。我想我找到了真正的原因。甚至 192.168.1.98:8080 也不起作用。如何配置tomcat来服务来自IP的请求?

标签: linux apache tomcat webserver


【解决方案1】:

如果你更改了某个域的 ip 并将这个域的这个 ip 放在 /etc/hosts 中,问题仍然是一样的吗?我从不使用 ip 创建虚拟主机,只使用一些域名。可能您在配置文件的不同位置为您的服务器设置了一些默认规则。

【讨论】:

  • 感谢您的回复。但我没有在任何地方配置任何 ip。这是新鲜的系统。 /etc/hosts 如下。 [root@test1 html]# cat /etc/hosts # Do not remove the following line, or various programs # that require network functionality will fail. ::1 localhost6.localdomain6 localhost6 127.0.0.1 test1 localhost.localdomain localhost 192.168.1.15 test1.lukup.internal 192.168.1.98 www.lukup.com
猜你喜欢
  • 2020-11-02
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-10-06
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多