Modify Nginx header camouflage server

Source: Internet
Author: User
Unlike letting the other party know their real webserver environment, they have to modify our webserer software! Sometimes we have to modify our webserer software to disguise our real server environment! Today, I checked the webserver of baidu.com and thought it was modified by nginx.
C: \ curl-7.18.0> curl.exe-I www. baidu. comHTTP/1.1 200 OKDate: Tue, 11 Mar 2008 05:00:39 GMTServer: BWS/1.0Content-Length: 3022Content-Type: text/htmlCache-Control: privateExpires: Tue, 11 Mar 2008 05:00:39 GMTSet-Cookie: BAIDUID = 41BB2845D3E8BC1AEE99D4CECB90C50A: FG = 1; expires = Tue, 11-8 05:00:39 GMT; path =/; domain =. baidu. comP3P: CP = "oti dsp cor iva our ind com"
Ha just feels that people may develop their own products with strong development backing! So I flipped through the nginx source code and found that it was easy to modify.
Cd/usr/local/src/nginx-0.5.35/src/core/[root @ zyatt core] # cat nginx. h/** Copyright (C) igor Sysoev */# ifndef _ nginx_h_encoded _ # define _ defined _ # define NGINX_VERSION "1.0" # define NGINX_VER "LPKWS/" NGINX_VERSION # define NGINX_VAR "LPKWS" # define limit ". oldbin "# endif/* _ NGINX_H_INCLUDED _*/
Test results
C: \ curl-7.18.0> curl.exe-I 211.100.11.122/info. php (this Nginx is not optimized and expires and gzip are configured for testing only) HTTP/1.1 200 OKServer: LPKWS/1.0 Date: Tue, 11 Mar 2008 04:53:02 GMTContent-Type: text/htmlTransfer-Encoding: chunkedConnection: keep-aliveKeep-Alive: timeout = 20X-Powered-By: PHP/5.2.4
Ha, just for entertainment. to really optimize and consider security, you should read the source code carefully and do a good job in detail!
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.