RError.com

RError.com Logo RError.com Logo

RError.com Navigation

  • 主页

Mobile menu

Close
  • 主页
  • 系统&网络
    • 热门问题
    • 最新问题
    • 标签
  • Ubuntu
    • 热门问题
    • 最新问题
    • 标签
  • 帮助
主页 / 问题

问题[proxy]

Martin Hope
Viktor
Asked: 2022-08-21 12:28:49 +0000 UTC

SonaType Nexus 3 代理无法正常工作

  • 0

无法配置代理 apt,安装了 SonaType Nexus 3,在安装过程中指示匿名访问权限。为 ubuntu 20.04 创建了 apt 代理。我复制了链接,在客户端机器上创建了 /etc/apt/apt.conf.d/01proxy 文件

Acquire::http::Proxy "http://192.168.66.226:8081/repository/apt/";
Acquire::https::Proxy "DIRECT";

我输入了apt update命令,输出为:

Ign:1 http://security.ubuntu.com/ubuntu focal-security InRelease
Ign:2 http://archive.ubuntu.com/ubuntu focal InRelease
Ign:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Err:4 http://security.ubuntu.com/ubuntu focal-security Release
  404  Not Found [IP: 192.168.66.226 8081]
Ign:5 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Err:6 http://archive.ubuntu.com/ubuntu focal Release
  404  Not Found [IP: 192.168.66.226 8081]
Err:7 http://archive.ubuntu.com/ubuntu focal-updates Release
  404  Not Found [IP: 192.168.66.226 8081]
Err:8 http://archive.ubuntu.com/ubuntu focal-backports Release
  404  Not Found [IP: 192.168.66.226 8081]
Reading package lists... Done
E: The repository 'http://security.ubuntu.com/ubuntu focal-security Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://archive.ubuntu.com/ubuntu focal Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://archive.ubuntu.com/ubuntu focal-updates Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://archive.ubuntu.com/ubuntu focal-backports Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

如果您通过浏览器访问本地网络上的链接http://192.168.66.226:8081/repository/apt/,它会将您重定向到http://archive.ubuntu.com/ubuntu/ 在此处输入图像描述

proxy
  • 1 个回答
  • 10 Views
Martin Hope
Kellso
Asked: 2022-06-12 02:51:55 +0000 UTC

HAProxy如何根据路径分离后端

  • 0

HAProxy 有一个这样的配置草案:

defaults
  log global
  mode http
  timeout connect 5000
  timeout client 5000
  timeout server 5000

frontend main
  bind *:80
  acl is_redmine path_beg /redmine
  use_backend redmine_back if is_redmine

backend redmine_back
  server redmine_server redmine:3000

如何将请求转发到 redmine(它是一个容器)并使用此路径“ some_adress/redmine/login ”获得响应?

现在 redmine 与“redmine”一词一起抛出请求。一个用于理解的日志示例,redmine 不处理0.0.0.0:3000/redmine:

redmine_1  | [2021-06-11 18:35:05] INFO  WEBrick 1.6.1
redmine_1  | [2021-06-11 18:35:05] INFO  ruby 2.7.3 (2021-04-05) [x86_64-linux]
redmine_1  | [2021-06-11 18:35:05] INFO  WEBrick::HTTPServer#start: pid=1 port=3000
redmine_1  | 172.18.0.4 - - [11/Jun/2021:18:35:11 UTC] "GET /redmine HTTP/1.1" 404 459
redmine_1  | - -> /redmine

我想在没有红包的情况下向他提出请求。

有没有人有一个工作配置的例子或在哪里阅读?

提前致谢。

更新 1

此解决方案有所帮助,但产生了一个新问题:

http-request set-path "%[path,regsub(^/redmine,/,i)]"

响应后,页面尝试加载静态内容,但没有redmine path ,即 http://some_addres/stylesheets/jquery/jquery-ui-1.12.1.css?1619448608,

但我想要http://some_addres/redmine /stylesheets/jquery/jquery-ui-1.12.1.css?1619448608

更新 2

我进行了重定向并且它起作用了,但它当然是错误的。这是一个配置示例,确切需要这样做的 mb,但我不推荐它:

frontend main
  bind *:80
  acl is_redmine path_beg -i /redmine
  acl is_redmine_referer hdr(Referer) -i -m sub /redmine
  http-request redirect location http://%[req.hdr(host)]/redmine%[path]?%[query] if !is_redmine is_redmine_referer
  use_backend redmine_back if is_redmine
  use_backend redmine_back if is_redmine_referer

backend redmine_back
  http-request set-path "%[path,regsub(^/redmine,/,i)]"
  server redmine_server redmine:3000
proxy
  • 1 个回答
  • 10 Views
Martin Hope
hedgehogues
Asked: 2020-06-17 21:25:14 +0000 UTC

traefik 反向代理

  • 0

在配置链接中,traefik如何理解所有请求都应该代理到端口5000 。这显然没有在任何地方指出。但实际上,出于某种原因,当我访问 mydomain.com 时,我看到了Hello World。它是如何发生的?

配置

defaultEntryPoints = ["http", "https"]

[web]
address = ":8080"

[entryPoints]
  [entryPoints.http]
  address = ":80"
    [entryPoints.http.redirect]
    entryPoint = "https"
  [entryPoints.https]
  address = ":443"
    [entryPoints.https.tls]

[acme]
email = "test@traefik.io"
storageFile = "/etc/traefik/acme/acme.json"
entryPoint = "https"
onDemand = false
OnHostRule = true
  # Use a HTTP-01 acme challenge rather than TLS-SNI-01 challenge
  [acme.httpChallenge]
  entryPoint = "http"

[docker]
endpoint = "unix:///var/run/docker.sock"
domain = "example.com"
watch = true
exposedbydefault = false

我注意到在链接的示例中,使用了 1.7 版本,尽管没有明确指出。因此,以下是修改后的组成:

version: '2'
services:
  flask:
    build: ./flask
    image: flask
    command: uwsgi --http-socket 0.0.0.0:5000 --wsgi-file app.py --callable app
    labels:
      - "traefik.enable=true"
      - "traefik.backend=flask"
      - "traefik.frontend.rule=${TRAEFIK_FRONTEND_RULE}"
  traefik:
    image: traefik:v1.7.24
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - ./traefik/traefik.toml:/etc/traefik/traefik.toml:ro
      - ./traefik/acme:/etc/traefik/acme
    ports:
     - "80:80"
     - "443:443"
     - "8080:8080"

traefik 反向代理的另一个链接

proxy
  • 1 个回答
  • 10 Views
Martin Hope
Каролина
Asked: 2020-05-04 23:02:30 +0000 UTC

通过代理 127.0.0.1 注销在浏览器中不起作用

  • 0

我使用 jmeter 进行测试,因此有必要在该程序的测试脚本记录器中记录操作。记录是通过指定端口、代理服务器和浏览器本身来完成的(即您浏览页面并记录操作)。我按照手册和YouTube上的视频进行了所有设置,但是没有一个浏览器通过代理127.0.0.1和8080或8888等不同的端口号访问Internet。告诉我可以做什么。网上有人建议清除缓存,关闭所有插件,检查hosts文件中是否有127.0.0.1地址。我检查了一切。没有什么帮助。

在此处输入图像描述

我还取消选中“所有协议的一个代理服务器”框 - 也没有帮助在此处输入图像描述

以下是浏览器显示的屏幕截图: 在此处输入图像描述

Ping 到 127.0.0.1 工作正常,没有丢包

proxy
  • 1 个回答
  • 10 Views
Martin Hope
mufdvr
Asked: 2020-08-28 00:03:32 +0000 UTC

将子域绑定到同一 IP 上的端口

  • 0

有 foo.example.com 和 bar.example.com 指向同一个 IP,分别打开端口 8080 和 8081,nginx 在其上运行。例如,当访问 foo.example.com 时,如何在没有重定向的情况下在端口 8080 上打开服务器?

proxy
  • 1 个回答
  • 10 Views

Sidebar

Stats

  • 问题 10021
  • Answers 30001
  • 最佳答案 8000
  • 用户 6900
  • 常问
  • 回答
  • Marko Smith

    我看不懂措辞

    • 1 个回答
  • Marko Smith

    请求的模块“del”不提供名为“default”的导出

    • 3 个回答
  • Marko Smith

    "!+tab" 在 HTML 的 vs 代码中不起作用

    • 5 个回答
  • Marko Smith

    我正在尝试解决“猜词”的问题。Python

    • 2 个回答
  • Marko Smith

    可以使用哪些命令将当前指针移动到指定的提交而不更改工作目录中的文件?

    • 1 个回答
  • Marko Smith

    Python解析野莓

    • 1 个回答
  • Marko Smith

    问题:“警告:检查最新版本的 pip 时出错。”

    • 2 个回答
  • Marko Smith

    帮助编写一个用值填充变量的循环。解决这个问题

    • 2 个回答
  • Marko Smith

    尽管依赖数组为空,但在渲染上调用了 2 次 useEffect

    • 2 个回答
  • Marko Smith

    数据不通过 Telegram.WebApp.sendData 发送

    • 1 个回答
  • Martin Hope
    Alexandr_TT 2020年新年大赛! 2020-12-20 18:20:21 +0000 UTC
  • Martin Hope
    Alexandr_TT 圣诞树动画 2020-12-23 00:38:08 +0000 UTC
  • Martin Hope
    Air 究竟是什么标识了网站访问者? 2020-11-03 15:49:20 +0000 UTC
  • Martin Hope
    Qwertiy 号码显示 9223372036854775807 2020-07-11 18:16:49 +0000 UTC
  • Martin Hope
    user216109 如何为黑客设下陷阱,或充分击退攻击? 2020-05-10 02:22:52 +0000 UTC
  • Martin Hope
    Qwertiy 并变成3个无穷大 2020-11-06 07:15:57 +0000 UTC
  • Martin Hope
    koks_rs 什么是样板代码? 2020-10-27 15:43:19 +0000 UTC
  • Martin Hope
    Sirop4ik 向 git 提交发布的正确方法是什么? 2020-10-05 00:02:00 +0000 UTC
  • Martin Hope
    faoxis 为什么在这么多示例中函数都称为 foo? 2020-08-15 04:42:49 +0000 UTC
  • Martin Hope
    Pavel Mayorov 如何从事件或回调函数中返回值?或者至少等他们完成。 2020-08-11 16:49:28 +0000 UTC

热门标签

javascript python java php c# c++ html android jquery mysql

Explore

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

Footer

RError.com

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

帮助

© 2023 RError.com All Rights Reserve   沪ICP备12040472号-5