# dnf copr enable bostrt/mod_serverheader
# dnf install mod_serverheader
The copr
plugin is now available for RHEL in Optional repos:
# yum install yum-plugin-copr
# yum copr enable bostrt/mod_serverheader
# yum install mod_serverheader
Drop YUM repo file into your /etc/yum/repos.d/
. Here's the repo file for RHEL 7.
/etc/httpd/conf.d/mod_serverheader.conf
Description: Modify Server header contents
Syntax: ServerHeader value
Context: server config, virtual host
Module: mod_serverheader
This directive allows you to override Apache HTTPD's Server
response header. In addition to configuring this directive, you may also need to modify your ServerTokens
directive to allow for a longer value to be used.
LoadModule serverheader_module modules/mod_serverheader.so
ServerTokens Full
ServerHeader my-server
Client will see this:
# curl -I http://example.com/
HTTP/1.1 200 OK
Date: Sat, 25 Feb 2017 01:47:40 GMT
Server: my-server ◀◀◀◀◀◀◀◀
Content-Length: 8
Content-Type: text/html; charset=iso-8859-1
# git clone https://github.com/bostrt/mod_serverheader.git
# cd mod_serverheader
# apxs -i -a -c mod_serverheader.c
https://robertbost.wordpress.com/2017/03/19/introducing-mod_serverheader/