AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1447436
Accepted
stackbiz
stackbiz
Asked: 2022-12-27 23:33:47 +0800 CST2022-12-27 23:33:47 +0800 CST 2022-12-27 23:33:47 +0800 CST

在反向代理后面配置 Archiva 时正在加载 Web UI

  • 772

我已经设置好archiva并httpd打开Ubuntu 22.04进行测试。

Apache Archiva version: 2.2.9
Apache HTTP Server: 2.4.52

虚拟主机配置:

<VirtualHost _default_:443>
    ProxyPass "/test/" "http://192.168.1.1:8080/"
    ProxyPassReverse "/test/" "http://192.168.1.1:8080/"
</VirtualHost>

HTTP 服务器 URL:https:
//my.example.com/test/ Archiva 服务器 URL:http: //192.168.1.1 :8080/

当使用Firefox直接打开http://192.168.1.1:8080/时,整个Archiva UI可以正常显示。

当使用 Firefox 打开https://my.example.com/test/时,Firefox 可以显示title为 " Apache Archiva" 但 Web Content 不显示,它只显示 " Loading"...

在此处输入图像描述

VirtualHost使Archivato 工作时缺少什么Reverse Proxy?

更新:这是来自 Firefox 的视图源代码:

查看源代码:https ://my.example.com/test/

<html>
  <head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <link rel="stylesheet" href="css/jquery.fileupload-ui.css"/>
    <link rel="stylesheet" href="css/jqueryFileTree.css"/>
    <link rel="stylesheet" href="css/jquery-ui-1.9.2.custom.min.css"/>
    <link rel="stylesheet" href="css/select2-3.2.css"/>
    <link rel="stylesheet" href="css/typeahead.js-bootstrap.0.9.3.css"/>
    <link rel="stylesheet" href="css/bootstrap.2.2.2.css">
    <link rel="stylesheet" href="css/archiva.css">
    <link rel="shortcut icon" href="favicon.ico"/>
    <link rel="stylesheet" href="css/prettify.css"/>

    <script type="text/javascript" src="js/jquery-1.11.1.min.js"></script>
    <script type="text/javascript" src="js/jquery-ui-1.10.4.min.js"></script>
    <script type="text/javascript" src="js/sammy.0.7.4.js"></script>
    <script type="text/javascript" data-main="js/archiva/archiva.js" src="js/require.min.2.1.11.js"></script>

    <title>Apache Archiva</title>

  </head>
...

查看源代码:https ://my.example.com/test/js/archiva/archiva.js

requirejs(['jquery','jquery.tmpl','jquery.ui','i18n','sammy','startup','utils','domReady!','archiva.main','archiva.cookie-information'], function () {
        loadi18n(function () {
          $.ajax({
            url: "restServices/archivaUiServices/runtimeInfoService/archivaRuntimeInfo/"+usedLang(),
            dataType: 'json',
            success:function(data){
              window.archivaDevMode=data.devMode;
              window.archivaJavascriptLog=data.javascriptLog;
              window.archivaRuntimeInfo=data;

              window.cookieInformation=mapCookieInformation(data.cookieInformation);

              require(['sammy','jquery','jquery.ui','i18n','jquery.tmpl','archiva.main','utils','domReady!'],function () {
                  startArchivaApplication();
                  $("#loadingDiv").hide();
                  drawQuickSearchAutocomplete();
              })
            }
          })
        });
      });  


  

从中view source,Firefox可以从中获取到正确的html内容Archiva 8080 server,但是无法激活js函数“ loadi18n”,“ $("#loadingDiv").hide();”根本不执行。

for 中的“ js/archiva/archiva.js”Archiva无法按预期reverse proxy mode工作unknown reason。

apache2
  • 1 1 个回答
  • 35 Views

1 个回答

  • Voted
  1. Best Answer
    Robin Hood
    2022-12-28T00:54:08+08:002022-12-28T00:54:08+08:00
    Listen 8080
    
    <VirtualHost *:8080>
            ServerName my.example.com/test/
    
            SSLEngine On
            SSLCertificateFile    /path/to/apache_certs/cert.pem
            SSLCertificateKeyFile /path/to/apache_certs/cert.key
    
            ProxyRequests     Off
            ProxyPass         /  http://localhost:8080/
            ProxyPassReverse  /  http://localhost:8080/
            <Proxy http://localhost:8080/*>
                    Order allow,deny
                    Allow from all
            </Proxy>
            ProxyPreserveHost on
    </VirtualHost>
    

    运行此命令进行配置two apache mods

    sudo a2enmod proxy proxy_http
    

    资源

    • 0

相关问题

  • 如何使用 fastcgi 和简单的测试脚本设置 apache?

  • 新贵监督的 Apache 初始化脚本?

  • http://localhost/ 不工作

  • 访问启用的虚拟主机时出现 403 禁止错误

  • 如何设置一台机器来将我的网站托管到世界各地 - 使用我自己的网址?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve