欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費電子書(shū)等14項超值服

開(kāi)通VIP
nginx 安裝配置sregex replace-filter-nginx-module替換返向代理內容
 replace-filter-nginx-module 替換示例
 replace_filter '"msg":"(.*?)"' '"msg":"1"' 'ig';
 #replace_filter '<div (.*?)>(.*?)</div>' '<br/>first div' 'ig';
replace_filter 'this is test (.*)<div class="name">' '</div><br/>last div' 'ig';


最后說(shuō)一些可能會(huì )出現的問(wèn)題

/usr/local/nginx/sbin/nginx: error while loading shared libraries: libsregex.so.0: cannot open shared object file: No such file or directory

對于上面這種問(wèn)題,可以用下面方法解決

ldd /usr/local/nginx/sbin/nginx

確定問(wèn)題后,如果是32位系統執行

ln -s /usr/local/lib/libsregex.so.0 /lib

 如果是64位系統,執行

ln -s /usr/local/lib/libsregex.so.0 /lib64


第一步:安裝依賴(lài)庫

CentOS用這個(gè)

yum install make gcc pcre-devel zlib-devel openssl-devel git bison wget

 

Ubuntu用這個(gè)

sudo apt-get install gcc libpcre++-dev libssl-dev make git

 

第二步:下載所需nginx的擴展源碼

mkdir -p /home/git/codecd /home/git/codegit clone https://github.com/yaoweibin/ngx_http_substitutions_filter_modulegit clone https://github.com/agentzh/sregexgit clone https://github.com/agentzh/replace-filter-nginx-module

 

 

第三步:安裝sregex

cd /home/git/code/sregexmakemake install

 

 

第四步:到www.nginx.org官方下載最新穩定版

mkdir ~/downcd ~/downwget http://nginx.org/download/nginx-1.8.0.tar.gztar zxvf nginx-1.6.2.tar.gz

 

 

第五步:編譯安裝

cd ~/down/nginx-1.6.2./configure --with-http_stub_status_module --with-http_ssl_module --with-http_spdy_module --with-http_realip_module --with-http_sub_module --with-http_gzip_static_module --with-ipv6 --add-module=/home/git/code/ngx_http_substitutions_filter_module --add-module=/home/git/code/replace-filter-nginx-module

執行編譯安裝

makemake install

 

 

 第六步:查看編譯相關(guān)信息

/usr/local/nginx/sbin/nginx -V

如果看到下面的提示就對了

nginx version: nginx/1.6.2built by gcc 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC)TLS SNI support enabledconfigure arguments: --with-http_stub_status_module --with-http_ssl_module --with-http_spdy_module --with-http_realip_module --with-http_sub_module --with-http_gzip_static_module --with-ipv6 --add-module=/home/git/ngx_http_substitutions_filter_module --add-module=/home/git/replace-filter-nginx-module

 

 

第七步:?jiǎn)?dòng)與檢查

當你執行下面語(yǔ)句時(shí),沒(méi)有任何返回,說(shuō)明運行成功。

/usr/local/nginx/sbin/nginx

確定是否運行成功

netstat -anp |grep 80

如果結果中存在

tcp        0      0 0.0.0.0:80                  0.0.0.0:*                   LISTEN      712/nginx

說(shuō)明成功了

再來(lái)看看712/nginx的具體路徑

ps x |grep 712

如果結果是

  712 ?        Ss     0:00 nginx: master process /usr/local/nginx/sbin/nginx

可以看到路徑/usr/local/nginx/sbin/nginx說(shuō)明成功了

 

最后將

/usr/local/nginx/sbin/nginx

寫(xiě)入到

/etc/rc.local

讓系統開(kāi)機就自動(dòng)啟動(dòng)nginx

 

 

 

 

最后說(shuō)一些可能會(huì )出現的問(wèn)題

/usr/local/nginx/sbin/nginx: error while loading shared libraries: libsregex.so.0: cannot open shared object file: No such file or directory

對于上面這種問(wèn)題,可以用下面方法解決

ldd /usr/local/nginx/sbin/nginx

確定問(wèn)題后,如果是32位系統執行

ln -s /usr/local/lib/libsregex.so.0 /lib

 如果是64位系統,執行

ln -s /usr/local/lib/libsregex.so.0 /lib64

 

 

 

關(guān)于配置PHP方面的

請編輯下面文件(推薦vi或vim)

/usr/local/nginx/conf/nginx.conf

1:找到下面一段文字,大概在65行(vi/vim編輯器的可以使用:65到達)

        #location ~ \.php$ {        #    root           html;        #    fastcgi_pass   127.0.0.1:9000;        #    fastcgi_index  index.php;        #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;        #    include        fastcgi_params;        #}

將每一行前面的#符號都去掉

 2:將其中的

fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;

改成

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

3:保存后,重新載入nginx配置文件

/usr/local/nginx/sbin/nginx -t/usr/local/nginx/sbin/nginx -s reload

4:創(chuàng )建phpinfo.php測試文件

/usr/local/nginx/html/phpinfo.php

 內容為

<?phpphpinfo();

5:運行php文件測試

http://127.0.0.1/phpinfo.php

請將127.0.0.1換成你服務(wù)器的IP地址,并在瀏覽器里打開(kāi)查看。

 

 

配置參考

worker_processes 1;pid logs/nginx.pid;events{    worker_connections 1024;}http{    access_log off;    include mime.types;    sendfile on;    client_body_temp_path temp/client_body_temp;    fastcgi_temp_path temp/fastcgi_temp;    scgi_temp_path temp/scgi_temp;    uwsgi_temp_path temp/uwsgi_temp;    proxy_temp_path temp/proxy_temp;    server{        listen 0.0.0.0:80;        server_name www.baidu.com;        proxy_set_header Host www.baidu.com;        proxy_set_header X-Real-IP $remote_addr;        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;        location / {            proxy_pass http://www.baidu.com;        }    }    server{        listen 0.0.0.0:80 default;        root html;    }}

 

本站僅提供存儲服務(wù),所有內容均由用戶(hù)發(fā)布,如發(fā)現有害或侵權內容,請點(diǎn)擊舉報。
打開(kāi)APP,閱讀全文并永久保存 查看更多類(lèi)似文章
猜你喜歡
類(lèi)似文章
使用Nginx的proxy_cache緩存取代Varnish
centos編譯安裝nginx,及其編譯參數解析
Nginx系列教程之三:nginx 必知必會(huì )
nginx在Linux環(huán)境下面的安裝介紹
nginx做負載均衡+keepalived(做主備)
LNMP環(huán)境配置(1)
更多類(lèi)似文章 >>
生活服務(wù)
分享 收藏 導長(cháng)圖 關(guān)注 下載文章
綁定賬號成功
后續可登錄賬號暢享VIP特權!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服

欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久