【问题标题】:Apache route subdomain to nginx on port?Apache将子域路由到端口上的nginx?
【发布时间】:2016-12-08 21:45:40
【问题描述】:

我有一个运行 CentOS 7 的服务器,它在端口 80 上运行了一个 Apache 网络服务器。我还在使用一个名为 GitLab 的通用开源 Git 项目,它使用 nginx 网络服务器而不是 Apache。我已经将 GitLab 的 nginx 配置为在 4444 端口上运行。

我有一个子域“git.mydomain.com”,我想转发到“mydomain.com:4444”,但我希望 URL 继续显示“git.mydomain.com”。

我相信我需要一个 Apache VirtualHost 文件,但我不知道该怎么做。

这可能吗?如果是这样,我该怎么做?

谢谢

【问题讨论】:

    标签: apache nginx


    【解决方案1】:

    您确实需要一个带有代理/反向代理指令的git.mydomain.com VirtualHost。见https://httpd.apache.org/docs/2.4/howto/reverse_proxy.html

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-01-22
      • 2020-02-29
      • 2020-09-17
      • 2014-07-02
      • 2020-10-27
      • 2020-04-16
      • 1970-01-01
      • 2016-05-10
      相关资源
      最近更新 更多