【问题标题】:Use same tomcat instance on multiple URL在多个 URL 上使用相同的 tomcat 实例
【发布时间】:2019-07-15 21:50:07
【问题描述】:

我的服务器 opxxx01 上运行了一个 tomcat 实例(FQDN:opxxx01.domain.com) 一切正常。但我想在另一个 URL 上显示相同的实例: quietude.anotherdomain.com

我阅读了很多关于此的主题,但对我没有任何帮助:

在 opxxx01.domain.com --> 好的

在 quietude.anotherdomain.com 上 --> KO

上下文: Red Hat Enterprise Linux Server 7.4 版(迈坡); 雄猫 8.5.30; 阿帕奇 2.4.6

您可以在下面看到我的代码,但 quietude.anotherdomain.com 上没有显示任何内容。

感谢您的帮助:)

<Host name="localhost"  appBase="webapps" unpackWARs="true" autoDeploy="true">
    <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
        prefix="localhost_access_log" suffix=".txt"
        pattern="%h %l %u %t &quot;%r&quot; %s %b %S %D %F" />
    <Valve className="org.apache.catalina.valves.ErrorReportValve" showReport="false" showServerInfo="false" />
</Host>
<!-- I added these lines below -->
<Host name="quietude.anotherdomain.com"  appBase="webapps" unpackWARs="true" autoDeploy="true">
    <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
        prefix="quietude_access_log" suffix=".txt"
        pattern="%h %l %u %t &quot;%r&quot; %s %b %S %D %F" />
</Host>

【问题讨论】:

    标签: apache tomcat


    【解决方案1】:

    我终于找到了!

    我的文件app.f2e312e439be13da8b85.js,我改:

    http://opxxx01.domain.com/downloads/quietude_result.csv
    

    通过

    /downloads/quietude_result.csv
    

    在我的文件 Statistics.vue 中,我进行了更改:

    axios.get('http://opxxx01.domain.com/downloads/quietude_result.csv').then(response => {
    

    通过

    axios.get('/downloads/quietude_result.csv').then(response => {
    

    【讨论】:

      猜你喜欢
      • 2013-04-13
      • 1970-01-01
      • 2018-09-16
      • 2014-11-23
      • 1970-01-01
      • 2020-10-31
      • 2011-05-25
      • 1970-01-01
      • 2017-06-08
      相关资源
      最近更新 更多