【问题标题】:How i access internet with reverse proxy nginx container?我如何使用反向代理 nginx 容器访问互联网?
【发布时间】:2022-12-31 08:04:21
【问题描述】:

我想创建一个容器 nginx 来像反向代理一样使用。我想通过他访问 google.com。我怎样才能做到这一点?

我的文件 nginx.conf:

events {
    worker_connections 1024;
}

http {
    server {
        listen 80 default_server;
        location / {
            proxy_pass https://www.google.com
        }
    }
}

【问题讨论】:

    标签: containers nginx-reverse-proxy


    【解决方案1】:

    安东尼,你的帖子很混乱,但我不知道足够的反向代理。

    您混合了两个概念,甚至尝试错误地添加第三个概念:反向代理(特别是)处理域处理和负载平衡。 Docker 容器化将应用程序模块化。

    由于你的姓氏听起来很熟悉,我建议你阅读这篇文章:https://rafaeldalsenter.medium.com/docker-compose-nginx-aplica%C3%A7%C3%A3o-web-banco-de-dados-d8f6f33adfd2

    【讨论】:

      猜你喜欢
      • 2017-09-25
      • 2018-03-27
      • 2020-09-10
      • 2021-05-04
      • 2014-07-11
      • 1970-01-01
      • 1970-01-01
      • 2021-09-30
      • 2018-03-20
      相关资源
      最近更新 更多