问题原文
原帖链接 · Orphans · CC BY-SA 3.0
I am running a couple of websites on different server on a local network. All websites are Proxied via one server where HTTPS is added and the trafic is monitored.
Currently, if someone makes a:
curl -I subdomain.domain.tld
The result is:
curl -I https://subdomain.domain.tld
HTTP/1.1 200 OK
Date: Fri, 13 Jan 2017 09:19:02 GMT
Server: Jetty(8.y.z-SNAPSHOT)
Content-Type: text/html
Content-Length: 2379
Last-Modified: Tue, 10 Jan 2017 11:15:29 GMT
How can I "override" the response the server behind the proxy gives with another respons from the ReverseProxy?
For example, I want my output to look something like this (if possible)
curl -I https://dubdomain.domain.tld
HTTP/1.1 200 OK
Date: Fri, 13 Jan 2017 09:19:02 GMT
Server: Apache24 (or even something else)
Content-Type: text/html
Content-Length: 2379
Last-Modified: Tue, 10 Jan 2017 11:15:29 GMT
Is this achievable?
已采纳解答
原帖链接 · Daniel Ferradal · CC BY-SA 3.0
You can not remove the Server Header in Apache, but in your case, yes you can just show the server tokens of the reverse proxy by adding:
Header unset Server
What this will do is remove the server header returned by the "backend" and show you the one from the reverse proxy.
If by any chance you want to remove or change this header even from the response of the reverse proxy, you will have to use mod_security, or at least that's the only method I know.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
