【问题标题】:Jhipster apache tomcat installJhipster apache tomcat 安装
【发布时间】:2018-07-17 15:17:08
【问题描述】:

我正在使用 JHipster 构建一个 Web 应用程序(很棒的项目,继续前进:)。 我正在使用已安装 apache 的服务器部署 php 应用程序 (http://www.myurl.com)

我正在尝试在另一个 url (http://www.myurl.com/my_project) 下部署我的 JHipster 应用程序

我试过了:

  1. 使用我自己的 tomcat 安装重写规则以重定向 /my_project http://localhost:PORT/my_project
  2. 使用可运行的 jhipster 战争
  3. 更改 yml 文件中的一些 cong 以在服务器下添加上下文 > 上下文路径

一切正常:

  1. 访问第一页 webapp 正常,但 404 访问任何其他页面
  2. 空白页,无法加载资源,因为我认为缺少上下文
  3. 不会改变任何东西

还有什么想法吗?我忘记了什么?与 webpack 相关的东西?

感谢您的帮助:)

【问题讨论】:

  • JHipster 的哪个版本,您使用的是 React 还是 Angular?
  • Angular 和 JHipster 4.14.1

标签: java spring apache tomcat jhipster


【解决方案1】:

使用 apache(httpd) 代理将调用重定向到你的 jHipster 应用程序到你的 tomcat 该配置旨在放入 apache 配置文件中,您必须在 apache 中启用代理 mod,但如果我的记忆很好,将用户会话从 apache httpd 代理到 tomcat 可能会非常棘手。以下语法是您正在寻找的 ProxyPass "/images" "http://www.example.com/" ProxyPassReverse "/images" "http://www.example.com/"

https://httpd.apache.org/docs/2.4/howto/reverse_proxy.html

【讨论】:

猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-12-24
  • 2018-06-16
  • 1970-01-01
  • 1970-01-01
  • 2014-08-05
  • 1970-01-01
相关资源
最近更新 更多