卖逼视频免费看片|狼人就干网中文字慕|成人av影院导航|人妻少妇精品无码专区二区妖婧|亚洲丝袜视频玖玖|一区二区免费中文|日本高清无码一区|国产91无码小说|国产黄片子视频91sese日韩|免费高清无码成人网站入口

nginx服務(wù)器配置

Linux6.2下所需軟件包:Gcc,make,glibpcre-8.32.zipnginx-1.3.10.tar .gz配置域名:解壓所需軟件包,編譯:unzip pcre-8.32.zipcd p

Linux6.2下

所需軟件包:

Gcc,make,glib

pcre-8.32.zip

nginx-1.3.10.tar .gz

配置域名:

解壓所需軟件包,編譯:

unzip pcre-8.32.zip

cd pcre-8.32

./configure

Make&&make install

tarzxvf nginx-1.3.10.tar.gz

cd nginx-1.3.10

./configure --with-http_stub_status_module --prefix=/opt/nginx Make&&make install

ln -s /usr/local/nginx/sbin/nginx /usr/local/sbin/

ls -l /usr/local/sbin/nginx

安裝apache 源碼包httpd-2.2.9.tar.gz ,啟動(dòng)apache 服務(wù). 創(chuàng)建所需訪問網(wǎng)頁(yè)根目錄以及訪問文件:

mkdir -p /web/www/baidu/htdocs

mkdir -p /web/www/sina/htdocs

echo "www.baidu.com" > /web/www/baidu/htdocs/index.html echo "www.sina.com" > /web/www/sina/htdocs/index.html

查找libpcre.so.l 文件:

,

進(jìn)入 /etc/ld.so.conf目錄下,修改配置文件:

輸入ldconfig 重新加載.

進(jìn)入nginx 主配置文件.

在97行左右下輸入配置文件:

server {

listen 80;

server_name www.baidu.com;

charset utf-8;

#access_log logs/baidu.access.log main;

location / {

root /web/www/baidu/htdocs;

index index.html index.htm;

}

}

server {

listen 80;

server_name www.sina.com;

charset utf-8;

#access_log logs/sina.access.log main;

location / {

root /web/www/sina/htdocs;

index index.html index.htm;

}

}

,

錄入保存后,輸入/opt/nginx/sbin/nginx -t進(jìn)行驗(yàn)證成功. 繼續(xù)輸入/opt/nginx/sbin/nginx啟動(dòng)服務(wù).

進(jìn)行訪問測(cè)試:

進(jìn)入nginx 主配置文件.

修改配置文件,添加以下幾行:

server {

listen

80;

,

server_name www.baidu.com;

charset utf-8;

access_log logs/baidu.access.log main;

location / {

root /web/www/baidu/htdocs;

index index.html index.htm;

location ~/status{

stub_status on;

access_log off;

}

}

}

查找到nginx 進(jìn)程號(hào),殺死進(jìn)程。重新啟動(dòng)nginx 服務(wù)

重啟輸入www.baidu.com/status可進(jìn)行訪問狀態(tài)統(tǒng)計(jì)

標(biāo)簽: