WHM gets confused with ServerTokens

Kelmas

Well-Known Member
Nov 6, 2006
121
0
166
Lithuania
I would like to set
Code:
ServerTokens ProductOnly
in Apache configuration file, but if I do this, WHM can't get versions and shows nothing in CPANEL/WHM NEWS which for me is important.

Is there any way to have ServerTokens ProductOnly, but don't get confusion in CPANEL/WHM NEWS?

I would like to ask cPanel makers to take a look at this issue in next cPanel release.
 

Infopro

Well-Known Member
May 20, 2003
17,075
524
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
Try this. mod_server_tokens

CONFIGURATION DIRECTIVES

FakeVersionString string
If specified, changes Apache's version string to the given string (except
for connections coming from the specified IP address).

Example:

<IfModule mod_server_tokens.c>
FakeVersionString "Apache"
ShowRealVersionStringTo "127.0.0.1"
</IfModule>
 

Kelmas

Well-Known Member
Nov 6, 2006
121
0
166
Lithuania
Note: as of November 11 2005 you need to specify web1.cpanel.net and web2.cpanel.net as allowed domains
So that means my httpd.conf must have this? (as follows)
Code:
<IfModule mod_server_tokens.c>
FakeVersionString "Apache"
ShowRealVersionStringTo "127.0.0.1"
ShowRealVersionStringTo "web1.cpanel.net"
ShowRealVersionStringTo "web2.cpanel.net"
</IfModule>
 

Kelmas

Well-Known Member
Nov 6, 2006
121
0
166
Lithuania
The module has a bug. It will successfully hide versions from outsiders, but when showing real versions for WHM, it will add asterixes right after apache version number:

Code:
Server Version: Apache/x.x.xx (Unix) [COLOR="Red"]****** [/COLOR]mod_auth_passthrough/x.x
mod_log_bytes/x.x mod_bwlimited/x.x FrontPage/x.x.x.xxxx.XXx.x
mod_ssl/x.x.xx OpenSSL/x.x.xx PHP-CGI/x.xx
while it should be:
Code:
Server Version: Apache/x.x.xx (Unix) mod_auth_passthrough/x.x
mod_log_bytes/x.x mod_bwlimited/x.x FrontPage/x.x.x.xxxx.XXx.x
mod_ssl/x.x.xx OpenSSL/x.x.xx PHP-CGI/x.xx
Anybody can help? I looked at source of the module, but couldn't solve it at the moment...