【问题标题】:liferay 6.1 & Tomcat 7 - change portliferay 6.1 & Tomcat 7 - 更改端口
【发布时间】:2012-11-21 18:02:59
【问题描述】:

在 Tomcat 上安装 Liferay 6.1 后,我想以 http:// myportal.local 的身份执行我的网络应用程序。

我更改文件主机:

127.0.0.1 myportal.local

我更改文件server.xml

<Connector port="8080"...<Connector port="80"...

但是当我输入 URL http:// localhosthttp:// myportal.local 时,响应是一个带有

的白页

有效!

你能帮帮我吗?

【问题讨论】:

  • 您的预期输出是什么?以及生命射线在这个问题中的作用是什么?

标签: tomcat dns liferay hosts connector


【解决方案1】:

端口 80 是 apache 使用的所有 http 请求的端口。通过这一行

127.0.0.1 myportal.local

你已经给你的本地主机起了一个名字

http://localhost and http://myportal.local 

将指向您的 apache 端口 80

现在您将看到一个带有“It works”的白页。这是您的 apache 中存在的 index.html 文件。

所以你要做的是,将你的 tomcat 端口本身保持为 8080,并在你的 apache 中编辑你的 workers.properties 和 httpd.conf 并将所有请求重定向到你的 tomcat。

然后您可以将您的 webapp 放入 webapps/Root 或相应地编辑您的 server.xml 以反映 url 更改。

编辑完所有这些文件后不要忘记重新启动 apache 和 tomcat。

【讨论】:

  • 我没有安装 apache,安装 apache 是实现目标的唯一途径吗?
  • 你有例子吗?我正在安装 Apache,但我不知道什么文件发生了变化,什么变化
猜你喜欢
  • 2017-05-07
  • 2015-12-10
  • 2018-05-05
  • 1970-01-01
  • 2017-04-04
  • 2020-07-24
  • 1970-01-01
  • 1970-01-01
  • 2012-03-02
相关资源
最近更新 更多