如何将nginx.conf文件配置为httpd-ssl.conf作为代理服务器

时间:2020-05-24 18:03:28

标签: apache nginx

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

我被困在auth_request set中设置httpd。我将近一个星期都在挣扎,所以有人可以告诉我如何将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;

1 个答案:

答案 0 :(得分:0)

在nginx httpd上找不到很多,但据我了解,这是一个Apache协议。也许这会帮助您:

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

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

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

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