mod_autoindex end information: Apache Server at your.domain.com Port 443
Http header: Server:Apache
So ServerSignature 和 ServerTokens has nothing to do with your problem directly.
In other words, there is no configuration item for Apache that can directly solve this problem (Apache does not have to be combined with PHP, so why should someone show you PHP information by the way after installing Apache?).
Indirect solution: The solution I gave is Debian/Ubuntu system + mod_php. It is estimated that other systems will be similar.
Attention, here is the only possibility with ServerTokens 有关的内容,如果你配置的是 Prod, 则只能显示出来Apache, 如果配置的是 Full which will display the large list of detailed information I mentioned before:
In addition, if you call shell_exec获得Apache版本号的话应该没有限制,可以不动ServerTokensconfiguration directly in php.
See more at:
Apache mod_autoindex Detailed description of Header and Readme PHP function to get Apache version information PHP Get PHP version information Declare the Handler of .php before calling this PHP. Although you may have stated it elsewhere, this configuration file is processed first by Apache. So we need to declare in advance what the information displayed by different ServerTokens looks like
This mainly involves two configurations ServerSignature 和 ServerTokens , ServerSignature 起开关作用,ServerTokens 控制显示信息多少。 修改 httpd.conf These two configurations are as follows, and they will be displayed after restarting.
ServerSignature On
ServerTokens Full
Attached are the related values of the two configurations
ServerSignature : Off | On | Email
ServerTokens: Prod | Major | Minor | Min | OS | Full (display content from small to large)
The page you see directly displayed in the file directory is processed by Apache's mod_autoindex module.
Let’s talk about what others mentioned before
ServerSignature
和ServerTokens
mod_autoindex end information:
Apache/2.4.10 (系统 Debian/Ubuntu/Windows之类的) OpenSSL/1.0.1t Server at your.domain.com Port 443
Http header:
Server:Apache/2.4.10 (系统 Debian/Ubuntu/Windows之类的) OpenSSL/1.0.1t
This is what it looks like:
mod_autoindex end information:
Apache Server at your.domain.com Port 443
Http header:
Server:Apache
So
ServerSignature
和ServerTokens
has nothing to do with your problem directly.In other words, there is no configuration item for Apache that can directly solve this problem (Apache does not have to be combined with PHP, so why should someone show you PHP information by the way after installing Apache?).
Indirect solution: The solution I gave is Debian/Ubuntu system + mod_php. It is estimated that other systems will be similar.
/etc/apache2/mods_enabled/autoindex.conf
</IfModule>
Preceded by:ReadmeName
和HeaderName
It may already exist, then change it.Then create
in the root directory of your website (the directory corresponding to your.domain.com/)README.php
Content:
Attention, here is the only possibility with
ServerTokens
有关的内容,如果你配置的是Prod
, 则只能显示出来Apache
, 如果配置的是Full
which will display the large list of detailed information I mentioned before:Apache/2.x.xx (系统 Debian/Ubuntu/Windows之类的) OpenSSL/1.0.xx
In addition, if you call
shell_exec
获得Apache版本号的话应该没有限制,可以不动ServerTokens
configuration directly in php.See more at:
Apache mod_autoindex Detailed description of Header and Readme
PHP function to get Apache version information
PHP Get PHP version information
Declare the Handler of .php before calling this PHP. Although you may have stated it elsewhere, this configuration file is processed first by Apache. So we need to declare in advance what the information displayed by different ServerTokens looks like
This mainly involves two configurations
ServerSignature
和ServerTokens
,ServerSignature
起开关作用,ServerTokens
控制显示信息多少。修改
httpd.conf
These two configurations are as follows, and they will be displayed after restarting.Attached are the related values of the two configurations
ServerSignature : Off | On | Email
ServerTokens: Prod | Major | Minor | Min | OS | Full (display content from small to large)