国产亚洲精品福利在线无卡一,国产精久久一区二区三区,亚洲精品无码国模,精品久久久久久无码专区不卡

當前位置: 首頁 > news >正文

網(wǎng)站開發(fā)主要用什么語言武漢seo關鍵詞排名優(yōu)化

網(wǎng)站開發(fā)主要用什么語言,武漢seo關鍵詞排名優(yōu)化,用php做的網(wǎng)站有哪些,家庭寬帶怎么做網(wǎng)站一般情況下,當用戶安裝云鎖的時候,云鎖會自動適配nginx版本,使用我們已經(jīng)預編譯好的包含云鎖模塊的nginx備份并替換掉您當前系統(tǒng)中使用的nginx。卸載時,會將系統(tǒng)原始nginx文件替換回來。因此,云鎖可保護使用nginx搭建的…

一般情況下,當用戶安裝云鎖的時候,云鎖會自動適配nginx版本,使用我們已經(jīng)預編譯好的包含云鎖模塊的nginx備份并替換掉您當前系統(tǒng)中使用的nginx。卸載時,會將系統(tǒng)原始nginx文件替換回來。因此,云鎖可保護使用nginx搭建的網(wǎng)站,開創(chuàng)了這個領域的先河。 我們秉承著讓安全變得更簡單的宗旨,使云鎖盡可能多的適配廣大用戶的nginx版本(目前無法覆蓋所有nginx版本),決定開放云鎖nginx模塊的源碼,讓有能力的小伙伴們自己動手同云鎖一起打造一個安全的nginx環(huán)境。

一 、編譯云鎖nginx模塊

步驟如下:

1.為避免意外情況發(fā)生, 請先將系統(tǒng)當前使用中的nginx進行備份(包括相關的網(wǎng)站配置文件)

2.wget https://codeload.github.com/yunsuo-open/nginx-plugin/zip/master -O nginx-plugin-master.zip

3.unzip nginx-plugin-master.zip

4.cd nginx-plugin-master

5.pwd 獲取當前云鎖插件源碼所在目錄的全路徑 (假設為:/home/nginx-plugin-master,實際情況以pwd輸出為準)

6.以下兩種情況, 可以跳過這一步驟: 1)您的 nginx 是 tengine。 2)nginx 版本大于等于 1.8.0 并且 安裝的云鎖為V3, 此時需要關注 第 8 條說明。

除以上兩種情況,對于 nginx 來說,由于其不支持post過濾,所以需要修改nginx源碼目錄下src/http/ngx_http_upstream.c 文件,步驟如下:

a.查找 static void ngx_http_upstream_init_request(ngx_http_request_t *r)函數(shù),在其所在行上方添加:int ngx_http_yunsuo_post_in_handler(ngx_http_request_t *r);

b.在ngx_http_upstream_init_request函數(shù)開頭,變量聲明后,添加:

if(ngx_http_yunsuo_post_in_handler(r)) {return;}

以nginx-1.0.11為例:
修改前源碼:

  static voidngx_http_upstream_init_request(ngx_http_request_t *r){ngx_str_t                      *host;ngx_uint_t                      i;ngx_resolver_ctx_t             *ctx, temp;ngx_http_cleanup_t             *cln;ngx_http_upstream_t            *u;ngx_http_core_loc_conf_t       *clcf;ngx_http_upstream_srv_conf_t   *uscf, **uscfp;ngx_http_upstream_main_conf_t  *umcf;if (r->aio) {return;}u = r->upstream;......}

修改后源碼:

  /*這段是添加的*/int ngx_http_yunsuo_post_in_handler(ngx_http_request_t *r);/*------------*/static voidngx_http_upstream_init_request(ngx_http_request_t *r){ngx_str_t                      *host;ngx_uint_t                      i;ngx_resolver_ctx_t             *ctx, temp;ngx_http_cleanup_t             *cln;ngx_http_upstream_t            *u;ngx_http_core_loc_conf_t       *clcf;ngx_http_upstream_srv_conf_t   *uscf, **uscfp;ngx_http_upstream_main_conf_t  *umcf;/*這段是添加的*/if(ngx_http_yunsuo_post_in_handler(r)) {return;}/*------------*/if (r->aio) {return;}u = r->upstream;......}

7.云鎖的nginx插件模塊是標準的nginx模塊,所以您在編譯nginx過程中,configure時只要添加額外參數(shù)–add-module=/home/nginx-plugin-master(注意:/home/nginx-plugin-master為示例,實際路徑以步驟5中pwd命令為準)即可讓nginx支持云鎖的功能,示例如下:

假設您之前configure時的命令如下:

  ./configure --prefix=/usr/local/nginx --with-http_stub_status_module \--with-http_ssl_module --with-http_gzip_static_module \--add-module=../ngx_cache_purge-1.3 

現(xiàn)在的configure時的命令如下:

  ./configure --prefix=/usr/local/nginx --with-http_stub_status_module \--with-http_ssl_module --with-http_gzip_static_module \--add-module=../ngx_cache_purge-1.3  --add-module=/home/nginx-plugin-master

8、以下兩種情況, 跳過此步驟:
1)您的 nginx 是 tengine。
2)在步驟 6 中 已經(jīng)做過了配置。 當您的 nginx 版本大于等于 1.8.0 并且安裝的云鎖為V3時,想要支持 POST 防護, 只需在 configure 生成的 Makefile (即 objs/Makefile 文件)中 CFLAGS 追加宏定義 HIGHERTHAN8 形如 : CFLAGS = -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g
修改為:CFLAGS = -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -DHIGHERTHAN8

9、編譯 nginx (注意:如果原本已經(jīng)有 nginx, 只執(zhí)行 make 即可,make install 會覆蓋掉你的 nginx.conf)

10、將系統(tǒng)當前使用中的nginx二進制文件替換為剛剛編譯好的包含了云鎖模塊的nginx文件即可

二 、讓云鎖識別您自己編譯的nginx(V3版本云鎖不需要執(zhí)行此步驟)

1、安裝云鎖,如果您已經(jīng)安裝了云鎖,可跳過此步驟。如果還沒有,請到http://www.yunsuo.com.cn/ht/software/下載并安裝云鎖
2、cd /usr/local/yunsuo_agent/nginx/
3、./configure_compile_nginx nginx_install_path (nginx_install_path為nginx的安裝路徑,即configure時 --prefix=path如果未指定過路徑, 那么默認為/usr/local/nginx)

技術交流 QQ掃一掃:

在這里插入圖片描述

http://aloenet.com.cn/news/38238.html

相關文章:

  • 服務器 無法訪問網(wǎng)站上海網(wǎng)絡推廣外包公司
  • 深圳建筑工程招聘信息凱里seo排名優(yōu)化
  • 最好的自助建站系統(tǒng)店鋪運營方案策劃
  • 網(wǎng)站建設開發(fā)的條件軟文營銷實施背景
  • 在北京做網(wǎng)站制作一個月多少錢百度快照收錄入口
  • 東莞汽車網(wǎng)站建設百度指數(shù)排名
  • 網(wǎng)站建設實力滴滴友鏈
  • 深圳市招聘信息網(wǎng)站佛山網(wǎng)絡排名優(yōu)化
  • 網(wǎng)站建設包含哪些方面刷關鍵詞排名軟件有用嗎
  • 深度網(wǎng)營銷型網(wǎng)站建設公司怎么樣seo網(wǎng)站優(yōu)化
  • 東莞網(wǎng)站設計電話網(wǎng)址查詢服務中心
  • 重慶廣告網(wǎng)站推廣seo結(jié)算系統(tǒng)
  • 高端網(wǎng)站建設公司價格關鍵詞優(yōu)化價格
  • 免費咨詢律師不收費的平臺長治seo顧問
  • 阿里巴巴招聘官網(wǎng)西安關鍵詞優(yōu)化平臺
  • 做特殊單頁的網(wǎng)站怎樣建立一個網(wǎng)絡銷售平臺
  • 自己做靜態(tài)網(wǎng)站的步驟百度搜索技巧
  • 建站寶盒做的網(wǎng)站十大免費excel網(wǎng)站
  • 公司做網(wǎng)站之前要準備什么軟件廣點通廣告投放平臺登錄
  • 什么網(wǎng)站做電氣自動化兼職做優(yōu)化的網(wǎng)站
  • 做博物館網(wǎng)站最重要性seo視頻教學網(wǎng)站
  • 深圳做網(wǎng)站有哪些指數(shù)函數(shù)
  • 設計師做網(wǎng)站的流程西安網(wǎng)站建設哪家好
  • 怎么設計自己的網(wǎng)站知乎小說推廣對接平臺
  • 專業(yè)汽車網(wǎng)站seo日常工作都做什么的
  • 做網(wǎng)站百度推廣多少錢客戶關系管理系統(tǒng)
  • 設計做網(wǎng)站哪家公司好短期培訓班學什么好
  • 遼寧城鄉(xiāng)建設部網(wǎng)站首頁網(wǎng)站策劃是干什么的
  • 內(nèi)網(wǎng)小網(wǎng)站的建設廣州網(wǎng)站運營
  • 仿站能被百度收錄嗎招商外包