Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/api/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
未设置RequestHeader apache httpd_Apache_Rhel_Request Headers - Fatal编程技术网

未设置RequestHeader apache httpd

未设置RequestHeader apache httpd,apache,rhel,request-headers,Apache,Rhel,Request Headers,我试图在ApacheHTTPD环境中设置RequestHeader。 我创建了一个非常简单的html页面和简单的验证设置,但无论我做什么,它都不会创建请求头。我验证了是否安装了mod_头,设置正常(响应)头工作正常。 即使使用.htaccess文件设置RequestHeader,它也不起作用。 我们正在使用以下设置: Red Hat Enterprise Linux Server 7.3版(Maipo) 服务器版本:Apache/2.4.6(Red Hat Enterprise Linux)

我试图在ApacheHTTPD环境中设置RequestHeader。 我创建了一个非常简单的html页面和简单的验证设置,但无论我做什么,它都不会创建请求头。我验证了是否安装了mod_头,设置正常(响应)头工作正常。 即使使用.htaccess文件设置RequestHeader,它也不起作用。 我们正在使用以下设置:

  • Red Hat Enterprise Linux Server 7.3版(Maipo)
  • 服务器版本:Apache/2.4.6(Red Hat Enterprise Linux)
虚拟主机文件:

<VirtualHost *:81>
    ServerName localhost
        ErrorLog /var/log/httpd/error_81
        TransferLog /var/log/httpd/access_81
        DocumentRoot /var/www/html81
        DirectoryIndex index.html index.cgi index.pl index.php index.xhtml
        Header add test "test"
        RequestHeader add test "test"
</VirtualHost>

服务器名本地主机
ErrorLog/var/log/httpd/error\u 81
TransferLog/var/log/httpd/access\u 81
DocumentRoot/var/www/html81
DirectoryIndex.html index.cgi index.pl index.php index.xhtml
标题添加测试“测试”
RequestHeader添加测试“测试”
在图像中,可以看到设置了标头,但没有设置RequestHeader 可悲的是,没有什么办法可以拿到头球。
有人知道如何让RequestHeader在apache上工作吗?

在Firefox控制台中看不到该请求头,只有在请求到达apache时才会将其添加到请求中(因此Firefox完全不知道它),这太糟糕了。我们正在运行一个jira,它可以在chrome上运行,但不能在InternetEXplorer或Firefox上运行。它们也需要对浏览器可见。你知道另一种设置浏览器可见的请求头的方法吗(不编辑代码,因为我们不能)?对不起,我不太明白你想实现什么(甚至你的问题是什么)嗯,问题已经解决了。它工作正常,但反向代理导致了问题。