欧美一区2区三区4区公司二百,国产精品婷婷午夜在线观看,自拍偷拍亚洲精品,国产美女诱惑一区二区

歡迎來到云服務(wù)器

服務(wù)器租用

centos linux安裝設(shè)置nginx具體教程

0.下載

#wget http://nginx.org/download/nginx-1.0.4.tar.gz

1.安裝

默認(rèn)安裝到/usr/local/nginx

#tar -zxvf nginx-1.0.4.tar.gz

#cd nginx-1.0.4

#./configure

#make;make install

2.運行

#/usr/local/nginx/sbin/nginx

#注:nginx默認(rèn)利用80端口,若是80端口被占用,修改/usr/local/nginx/conf/nginx.conf里的

server {

listen 80;

3.測試

#echo “test123″ > /usr/local/nginx/html/index.html

#wget http://127.0.0.1

假如有報錯請參考下面的報錯辦理步伐。

4.根基呼吁

/usr/local/nginx/sbin/nginx -h #輔佐  

/usr/local/nginx/sbin/nginx -v #顯示版本  

/usr/local/nginx/sbin/nginx -V #顯示版本和設(shè)置信息  

/usr/local/nginx/sbin/nginx -t #測試設(shè)置  

/usr/local/nginx/sbin/nginx -q #測試設(shè)置時,只輸墮落誤信息  

/usr/local/nginx/sbin/nginx -s stop #遏制處事器  

/usr/local/nginx/sbin/nginx -s reload #從頭加載設(shè)置  

/usr/local/nginx/sbin/nginx -s quit #不知道,預(yù)計和stop差不多  

/usr/local/nginx/sbin/nginx -s reopen #不知道,預(yù)計和reload雷同  

/usr/local/nginx/sbin/nginx -p /nginx/path #默認(rèn)為/usr/local/nginx(nginx安裝路徑),修改后影響log目次和html目次  

/usr/local/nginx/sbin/nginx -c /configure/file/path #設(shè)置文件路徑,默認(rèn)為conf/nginx.conf,有多個設(shè)置文件時很有用,用這個可以啟動多個差異的nginx監(jiān)聽差異端口  

/usr/local/nginx/sbin/nginx -g #沒用過 

#user nobody; #nginx啟動利用的用戶,設(shè)置fastcgi時,需要改為有權(quán)限執(zhí)行fastcgi的用戶  

worker_processes 1; #nginx啟動的歷程數(shù),1個已經(jīng)足夠了  

#error_log logs/error.log; #nginx 錯誤日志 相對付/usr/local/nginx/  

#error_log logs/error.log notice; #nginx 記錄告誡日志 相對付/usr/local/nginx/ ,可改為 logs/notice.log  

#error_log logs/error.log info; #nginx 記錄信息日志 相對付/usr/local/nginx/ ,可改為 logs/info.log  

#pid logs/nginx.pid; #nginx歷程文件,最好不要改  

events {  

worker_connections 1024; #nginx最大毗連數(shù),最好小于系統(tǒng)的socket最大數(shù)和文件打開數(shù)  

}  

http {  

include mime.types; #見同目次mime.types,用于按照文件后綴發(fā)生http header  

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”‘;  

#access_log logs/access.log main; #會見日志  

sendfile on;  

#tcp_nopush on;  

#keepalive_timeout 0;  

keepalive_timeout 65; #保持毗連時間,單元:秒  

#gzip on;  

server {  

listen 80; #監(jiān)聽的端口  

server_name localhost; #處事器名  

#charset koi8-r; #默認(rèn)字符集  

#access_log logs/host.access.log main; #按照會見域名生成對應(yīng)的會見日志  

location / {  

root html; #根目次,相對付安裝目次  

index index.html index.htm; #默認(rèn)主頁  

}  

#error_page 404 /404.html; #錯誤頁  

# redirect server error pages to the static page /50x.html  

#  

error_page 500 502 503 504 /50x.html;  

location = /50x.html {  

root html;  

}  

# proxy the PHP scripts to Apache listening on 127.0.0.1:80  

#  

#location ~ .php$ {  

# proxy_pass http://127.0.0.1;  

#}  

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000  

#  

#location ~ .php$ {  

# root html;  

# fastcgi_pass 127.0.0.1:9000; #轉(zhuǎn)發(fā)到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  

#  

#location ~ /.ht {  

# deny all;  

#}  

}  

# another virtual host using mix of IP-, name-, and port-based configuration  

#  

#server {  

# listen 8000;  

# listen somename:8080;  

# server_name somename alias another.alias;  

# location / {  

# root html;  

# index index.html index.htm;  

# }  

#}  

# HTTPS server  

#  

#server {  

# listen 443;  

# server_name localhost;  

# ssl on;  

# ssl_certificate cert.pem;  

# ssl_certificate_key cert.key;  

# ssl_session_timeout 5m;  

# ssl_protocols SSLv2 SSLv3 TLSv1;  

# ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;  

# ssl_prefer_server_ciphers on;  

# location / {  

# root html;  

# index index.html index.htm;  

# }  

#}  

5.設(shè)置

設(shè)置文件在 安裝目次/conf/nginx.conf

修改完后用 /usr/local/nginx/sbin/nginx -s reload從頭加載

==================報錯==============================================

./configure: error: the HTTP rewrite module requires the PCRE library

2010-02-25 15:58

有時候,我們需要單獨安裝nginx,,來處理懲罰大量的下載請求。單獨在Centos5安裝nginx碰著的rewrite和HTTP cache錯誤辦理步伐:

wget http://nginx.org/download/nginx-0.8.33.tar.gz
tar -zxvf nginx-0.8.33.tar.gz
cd nginx-0.8.33
./configure –prefix=/usr/local/nginx

安裝Nginx時報錯

./configure: error: the HTTP rewrite module requires the PCRE library.

安裝pcre-devel辦理問題
yum -y install pcre-devel

騰訊云代理

Copyright © 2003-2021 MFISP.COM. 國外vps服務(wù)器租用 夢飛云服務(wù)器租用 版權(quán)所有 ? 粵ICP備11019662號

主站蜘蛛池模板: 鄱阳县| 防城港市| 鹿泉市| 南昌县| 贺兰县| 玉屏| 内江市| 新蔡县| 涞水县| 五莲县| 炎陵县| 肇东市| 沙河市| 靖西县| 昔阳县| 马尔康县| 谷城县| 陆良县| 随州市| 南充市| 泰安市| 马龙县| 边坝县| 平泉县| 朝阳县| 克什克腾旗| 武冈市| 渑池县| 蒲江县| 巴中市| 渭南市| 永胜县| 墨竹工卡县| 赤壁市| 吉安县| 裕民县| 易门县| 宁武县| 钟祥市| 尼玛县| 开原市|