Hide php, nginx, and apache versions and disguise nginx and apache

Source: Internet
Author: User

Prevent them from cracking, let them disguise themselves, and let them think about it slowly!

1. Hide the php version number

Hiding method: Add the following code to vimphp. ini:


expose_php = Off  


2. Hide the nginx version number

Hiding method: vimnginx. conf is added to http.


sever_tokens= Off  


3. Hide the apache version

Hiding method: Add the following code to vim httpd. ini:


ServerTokens = ProductOnly   ServerSignature = Off  


To modify each configuration file, you must restart the service to make it take effect.

Disguise apache

Edit the ap_release.h file and change "# define AP_SERVER_BASEPRODUCT \" Apache \ "to" # define AP_SERVER_BASEPRODUCT \ "Microsoft-IIS/5.0 \"".

Edit the OS/unix/OS. h file and change "# define PLATFORM \" Unix \ "to" # define PLATFORM \ "Win32 \"".
After modification, recompile and install Apache.

Disguise nginx

Cd/usr/local/src/nginx-1.0.6/src/core/

[Root @ server core] # catnginx. h


/*  * Copyright (C) Igor Sysoev  */  #ifndef _NGINX_H_INCLUDED_  #define _NGINX_H_INCLUDED_   #define NGINX_VERSION      "1.0"  #define NGINX_VER          "ZWS/" NGINX_VERSION   #define NGINX_VAR          "ZWS"  #define NGX_OLDPID_EXT     ".oldbin"   #endif /* _NGINX_H_INCLUDED_ */  


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.