内射老阿姨1区2区3区4区_久久精品人人做人人爽电影蜜月_久久国产精品亚洲77777_99精品又大又爽又粗少妇毛片

Nginx學(xué)習(xí)筆記——安裝

Nginx安裝 linux安裝

下載 tar.gz 包,以及依賴 openssl、zlib、pcre

十余年的長春網(wǎng)站建設(shè)經(jīng)驗(yàn),針對設(shè)計(jì)、前端、開發(fā)、售后、文案、推廣等六對一服務(wù),響應(yīng)快,48小時(shí)及時(shí)工作處理。成都全網(wǎng)營銷推廣的優(yōu)勢是能夠根據(jù)用戶設(shè)備顯示端的尺寸不同,自動調(diào)整長春建站的顯示方式,使網(wǎng)站能夠適用不同顯示終端,在瀏覽器中調(diào)整網(wǎng)站的寬度,無論在任何一種瀏覽器上瀏覽網(wǎng)站,都能展現(xiàn)優(yōu)雅布局與設(shè)計(jì),從而大程度地提升瀏覽體驗(yàn)。創(chuàng)新互聯(lián)建站從事“長春網(wǎng)站設(shè)計(jì)”,“長春網(wǎng)站推廣”以來,每個(gè)客戶項(xiàng)目都認(rèn)真落實(shí)執(zhí)行。

openssl、zlib、pcre 安裝

cd 對應(yīng)目錄 ./configure make make install

nginx 安裝

cd 對應(yīng)目錄 ./configure --with-pcre=pcre路徑 --with-zlib=zlib路徑 --with-openssl=openssl路徑 make make install

ps:./configure 用法 參考

./configure -prefix=/usr 意思是將該軟件安裝在 /usr 下面,執(zhí)行文件就會安裝在 /usr/bin,資源文件就會安裝在 /usr/share(而不是默認(rèn)的/usr/local/share),具體可以通過 --help 查看。

windows安裝

官網(wǎng)下載windows版本安裝之后,雙擊啟動(窗口會一閃而過,會有兩個(gè)nginx進(jìn)程,應(yīng)該是主和從)

Nginx 默認(rèn)配置

默認(rèn)配置如下

user nginx; worker_processes 1; #啟用的進(jìn)程數(shù),根據(jù)cpu數(shù)量配置 error_log /var/log/nginx/error.log warn; #錯(cuò)誤日志輸出文件 pid /var/run/nginx.pid; events { worker_connections 1024; #單個(gè)后臺worker process進(jìn)程的并發(fā)鏈接數(shù) } http { include /etc/nginx/mime.types; #設(shè)定mime類型,類型由mime.type文件定義 default_type application/octet-stream; log_format main \'$remote_addr - $remote_user [$time_local] "$request" \' \'$status $body_bytes_sent "$http_referer" \' \'"$http_user_agent" "$http_x_forwarded_for"\'; #設(shè)定日志格式 access_log /var/log/nginx/access.log main; #日志輸出文件 sendfile on; #tcp_nopush on; keepalive_timeout 65; #連接超時(shí)時(shí)間 #gzip on; #開啟gzip壓縮 include /etc/nginx/conf.d/*.conf; }

server { listen 80; #監(jiān)聽端口 server_name localhost; #使用localhost訪問時(shí) #charset koi8-r; #access_log /var/log/nginx/log/host.access.log main; #設(shè)定本虛擬主機(jī)的訪問日志 location / { root /usr/share/nginx/html; #服務(wù)器網(wǎng)站根目錄 index index.html index.htm; #首頁文件的名稱 } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; # 定義錯(cuò)誤提示頁面 location = /50x.html { root /usr/share/nginx/html; } # proxy the PHP scripts to Apache listening on 127.0.0.1:80 # php腳本請求轉(zhuǎn)發(fā)到 http://127.0.0.1 #location ~ .php$ { # proxy_pass http://127.0.0.1; #} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # PHP 腳本請求全部轉(zhuǎn)發(fā)到 FastCGI處理. 使用FastCGI默認(rèn)配置. #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; #} # deny access to .htaccess files, if Apache\'s document root # concurs with nginx\'s one # 禁止訪問 .htxxx 文件 #location ~ /.ht { # deny all; #} }

網(wǎng)站名稱:Nginx學(xué)習(xí)筆記——安裝
文章起源:http://www.rwnh.cn/article32/cpjdsc.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供標(biāo)簽優(yōu)化、微信小程序自適應(yīng)網(wǎng)站、建站公司、電子商務(wù)、網(wǎng)站設(shè)計(jì)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

搜索引擎優(yōu)化
海盐县| 舞阳县| 阳西县| 南华县| 饶平县| 东乌| 墨玉县| 巴青县| 灌南县| 巧家县| 乌拉特前旗| 当阳市| 渭南市| 万盛区| 浮梁县| 崇明县| 廉江市| 荔波县| 同江市| 宁安市| 长海县| 剑阁县| 右玉县| 北川| 万山特区| 吉林省| 闽侯县| 吴旗县| 鄱阳县| 博客| 高碑店市| 内乡县| 彝良县| 荆门市| 仙居县| 和顺县| 监利县| 五寨县| 安龙县| 深圳市| 鄂州市|