【问题标题】:how to configure nginx.conf file into httpd-ssl.conf as proxy server如何将 nginx.conf 文件配置为 httpd-ssl.conf 作为代理服务器
【发布时间】:2020-05-24 18:03:28
【问题描述】:

我来这里是为了在配置http-ssl.conf 文件时找到一些帮助。我们使用 nginx 作为代理服务器,但现在我们正在尝试用 Apache HTTP Server (httpd) 服务器替换它。我们有各种代理标头集和auth_request 集,用于 GUI 页面重定向。

我在httpd 中设置auth_request set。我挣扎了将近一个星期,所以有人可以告诉我如何将下面的 nginx 配置设置到 httpd 中:

auth_request        /auth;
auth_request_set    $user $upstream_http_user;
auth_request_set    $role $upstream_http_role;
auth_request_set    $domain $upstream_http_domain;
proxy_set_header    user $user;
proxy_set_header    role $role;
proxy_set_header    domain $domain;

proxy_set_header    X-Real-IP $remote_addr;
proxy_set_header    X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header    X-Forwarded-Proto $scheme;
proxy_redirect      /graph /xxxx/graph;

【问题讨论】:

    标签: apache nginx


    【解决方案1】:

    我在 nginx httpd 上找不到太多信息,但据我所知,这是一个 Apache 协议。也许这会对你有所帮助:

    apachectl 是 Apache 超文本传输​​协议的前端 (HTTP) 服务器。它旨在帮助管理员控制 Apache httpd 守护进程的功能。

    apachectl 脚本可以在两种模式下运行。首先,它可以作为一个 httpd 命令的简单前端,只需设置任何必要的 环境变量,然后调用 httpd,通过任何 命令行参数。二、apachectl可以充当SysV init 脚本,采用简单的单字参数,例如 start、restart 和 停止,并将它们转换为适当的信号给 httpd。

    如果您的 Apache 安装使用非标准路径,您将需要 编辑 apachectl 脚本以设置 httpd 的适当路径 二进制。您还可以指定任何必要的 httpd 命令行 论据。有关详细信息,请参阅脚本中的 cmets。

    https://httpd.apache.org/docs/2.4/programs/apachectl.html

    【讨论】:

    • 感谢您的快速回复。但我坚持在 httpd.conf 中配置上述设置。那么你能请我们如何将上面的代码配置到httpd中
    • 或 httpd 中我可以使用的任何替代配置都会有所帮助..
    猜你喜欢
    • 2019-08-21
    • 2012-09-13
    • 2018-08-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-12-19
    • 1970-01-01
    相关资源
    最近更新 更多