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

歡迎來到夢飛科技

服務器租用

當前優惠活動:

centos linux安裝配置nginx詳細教程

0.下載

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

1.安裝

默認安裝到/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默認利用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 #顯示版本和設置信息  

/usr/local/nginx/sbin/nginx -t #測試設置  

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

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

/usr/local/nginx/sbin/nginx -s reload #從頭加載設置  

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

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

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

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

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

#user nobody; #nginx啟動利用的用戶,設置fastcgi時,臺灣代理服務器 韓國服務器,需要改為有權限執行fastcgi的用戶  

worker_processes 1; #nginx啟動的歷程數,1個已經足夠了  

#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最大毗連數,最好小于系統的socket最大數和文件打開數  

}  

http {  

include mime.types; #見同目次mime.types,用于按照文件后綴發生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; #監聽的端口  

server_name localhost; #處事器名  

#charset koi8-r; #默認字符集  

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

location / {  

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

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;  

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; #轉發到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.設置

設置文件在 安裝目次/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-2019 MFISP.COM. 國外服務器租用 IDC公司 版權所有 ? 粵ICP備11019662號

主站蜘蛛池模板: 枣强县| 盐亭县| 调兵山市| 晋江市| 托里县| 天祝| 仁怀市| 九龙县| 从化市| 洪洞县| 崇左市| 徐汇区| 安塞县| 新安县| 林周县| 招远市| 施甸县| 泰顺县| 随州市| 峨边| 开化县| 万宁市| 社会| 乌拉特前旗| 博客| 潞城市| 西丰县| 呼伦贝尔市| 江陵县| 鹤山市| 祁阳县| 崇阳县| 临安市| 十堰市| 杭锦后旗| 察哈| 海丰县| 家居| 旬邑县| 洪泽县| 皮山县|