hellopasswd
10年的寶塔網(wǎng)站建設(shè)經(jīng)驗,針對設(shè)計、前端、開發(fā)、售后、文案、推廣等六對一服務(wù),響應(yīng)快,48小時及時工作處理。全網(wǎng)營銷推廣的優(yōu)勢是能夠根據(jù)用戶設(shè)備顯示端的尺寸不同,自動調(diào)整寶塔建站的顯示方式,使網(wǎng)站能夠適用不同顯示終端,在瀏覽器中調(diào)整網(wǎng)站的寬度,無論在任何一種瀏覽器上瀏覽網(wǎng)站,都能展現(xiàn)優(yōu)雅布局與設(shè)計,從而大程度地提升瀏覽體驗。創(chuàng)新互聯(lián)從事“寶塔網(wǎng)站設(shè)計”,“寶塔網(wǎng)站推廣”以來,每個客戶項目都認(rèn)真落實執(zhí)行。[root@localhost vhost]# vi ../nginx.conf /fog_format
log_format combined_realip \'$remote_addr $http_x_forwarded_for [$time_local]\' \' $host "$request_uri" $status\' \' "$http_referer" "$http_user_agent"\'; 其中combined_realip 日志名 $remote addr 客戶端IP(公網(wǎng)IP) $http_x_forwarded_for 代理服務(wù)器的IP $time_local 服務(wù)器本地時間 $host f訪問主機名(域名) $request_uri 訪問的url地址 $status 狀態(tài)碼 $http_referer referer $http_user_agent user_agent
添加access_log /tmp/test.com.log user;
[root@localhost vhost]# vi test.com.conf 1 server 2 { 3 listen 80; 4 server_name test.com test1.com test2.com; 5 index index.html index.htm index.php; 6 root /data/wwwroot/test.com; 7 if ($host != \'test.com\'){ 8 rewrite ^/(.*)$ http://test.com/$1 permanent; 9 } 10 11 location ~(.*)admin.php$ 12 { 13 auth_basic "Auth"; 14 auth_basic_user_file /usr/local/nginx/conf/htpasswd; 15 } 16 access_log /tmp/test.com.log user; 17 } [root@localhost vhost]# /usr/local/nginx/sbin/nginx -t nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful [root@localhost vhost]# /usr/local/nginx/sbin/nginx -s reload
[root@localhost vhost]# curl -x 127.0.0.1:80 test2.com/admin/index.html -I HTTP/1.1 301 Moved Permanently Server: nginx/1.4.7 Date: Thu, 04 Jan 2018 08:07:12 GMT Content-Type: text/html Content-Length: 184 Connection: keep-alive Location: http://test.com/admin/index.html [root@localhost vhost]# curl -x 127.0.0.1:80 test1.com/admin/index.html -I HTTP/1.1 301 Moved Permanently Server: nginx/1.4.7 Date: Thu, 04 Jan 2018 08:07:16 GMT Content-Type: text/html Content-Length: 184 Connection: keep-alive Location: http://test.com/admin/index.html [root@localhost vhost]# cat /tmp/test.com.log 127.0.0.1 - - [04/Jan/2018:16:07:12 +0800] "HEAD HTTP://test2.com/admin/index.html HTTP/1.1" 301 0 "-" "curl/7.29.0" 127.0.0.1 - - [04/Jan/2018:16:07:16 +0800] "HEAD HTTP://test1.com/admin/index.html HTTP/1.1" 301 0 "-" "curl/7.29.0"
當(dāng)前名稱:【CentOS7LNMP架構(gòu)24】,nginx訪問日志#180105
標(biāo)題URL:http://www.rwnh.cn/article26/cpeejg.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供移動網(wǎng)站建設(shè)、建站公司、營銷型網(wǎng)站建設(shè)、虛擬主機、域名注冊、微信小程序
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)