← 返回上一頁
伺服器建置

修改nginx版本資訊

最後更新:2018-07-12
Nginx
⚠ 本文最後更新於 2018-07-12(8 年前),部分內容可能已過時。

修改nginx版本資訊

修改前:
404 not found
--------------------
nginx/0.8.41

修改後:
404 not found
--------------------
Aiyonet.com/0.1.8

步驟1:
修改檔 nginx-0.8.41/src/core/nginx.h

#define nginx_version         018
#define NGINX_VERSION      "0.1.8"
#define NGINX_VER          "Aiyonet.com/" NGINX_VERSION
#define NGINX_VAR          "AIYONET.COM"

步驟2:
修改檔 nginx-0.8.41/src/http/ngx_http_header_filter_module.c

static char ngx_http_server_string[] = "Server: Aiyonet.com" CRLF;
static char ngx_http_server_full_string[] = "Server: " NGINX_VER CRLF;

 

分享這篇
X LinkedIn Facebook Hacker News Reddit

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

這個網站採用 Akismet 服務減少垃圾留言。進一步了解 Akismet 如何處理網站訪客的留言資料。