เพื่อเป็นการป้องการกันโจมที apache server โดยการทำ Fake banner ของ apache service
/etc/httpd/conf/httpd.conf ; redhat distro
ServerTokens Full,OS,Minor,Minimal,Major,Prod
ServerTokens Setting
ProductOnly Server: Apache
Major Server: Apache/2
Minor Server: Apache/2.0
Minimal Server: Apache/2.0.55
OS Server: Apache/2.0.55 (Debian)
Full (or not specified) default Server: Apache/2.0.55 (Debian) PHP/5.1.2-1+b1 mod_ssl/2.0.55 OpenSSL/0.9.8b
ถ้าจะแก้ไข header : กรณีที่ต้องการเปลี่ยน banner ไปเลย
/usr/include/httpd/httpd.h ; apache v.1
/usr/include/httpd/ap_release.h ; apache v.2
44 #define AP_SERVER_BASEPRODUCT “Apache”
45
46 #define AP_SERVER_MAJORVERSION_NUMBER 2
47 #define AP_SERVER_MINORVERSION_NUMBER 2
48 #define AP_SERVER_PATCHLEVEL_NUMBER 9
ตัวอย่างการ config ServerTokens แบบ Full ก็เช่นเวปนี้ จะได้
Apache/2.2.9 (FreeBSD) mod_ssl/2.2.9 OpenSSL/0.9.8e DAV/2
PHP/5.2.6 with Suhosin-Patch SVN/1.5.2
อิอิ
