国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開APP
userphoto
未登錄

開通VIP,暢享免費(fèi)電子書等14項(xiàng)超值服

開通VIP
用nginx tomcat來代替apache jk tomcat

用nginx+tomcat來代替apache+jk+tomcat 

#wget http://sysoev.ru/nginx/nginx-0.6.26.tar.gz 
#tar zxvf nginx-0.6.26.tar.gz 
#cd nginx-0.6.26 
#[root@test nginx-0.6.26]# ./configure  
./configure: error: the HTTP rewrite module requires the PCRE library. 
You can either disable the module by using --without-http_rewrite_module 
option, or install the PCRE library into the system, or build the PCRE library 
statically from the source with nginx by using --with-pcre=<path> option. 
[root@test nginx-0.6.26]# rpm -qa|grep pcre 
pcre-6.6-1.1 
[root@test suantop]# rpm -ivh pcre-devel-6.6-1.1.i386.rpm  
warning: pcre-devel-6.6-1.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186 
Preparing...                ########################################### [100%] 
   1:pcre-devel             ########################################### [100%] 

[root@test suantop]# rpm -qa|grep pcre 
pcre-6.6-1.1 
pcre-devel-6.6-1.1 

等再次執(zhí)行./configure 
[root@test nginx-0.6.26]# ./configure --with-http_stub_status_module 
[root@test nginx-0.6.26]# make 
[root@test nginx-0.6.26]# make install 
修改配置文件 /usr/local/nginx/conf/nginx.conf 
給出一些主要更改的地方 
user  nobody nobody; 
worker_processes  2; 
error_log  logs/error.log  notice; 
pid        logs/nginx.pid; 
events 
    worker_connections  1024; 

http 
    include       mime.types; 
    default_type  application/octet-stream; 
    include    /usr/local/nginx/conf/proxy.conf; 
#上面這行是增加的 
    server 
        listen       81; 
        server_name  localhost;   
        charset gb2312; 
serve static files 
        location ^/(images|pages|javascript|js|css|flash|media|static)/  
                root    /usr/local/www; 
                expires 30d; 
        location 
            root /usr/local/www;            
            index  index.jsp index.htm; 
            proxy_pass http://192.168.1.250:8080; 
          

location /NginxStatus 
                        stub_status             on; 
                        access_log              on; 
                        auth_basic              "NginxStatus"; 
                


說明配置文件中有提到proxy.conf 這個(gè)文件可以VI一個(gè)如下文件 
[root@test conf]# cat proxy.conf  
#!nginx (-) 
proxy.conf 
proxy_redirect          off; 
proxy_set_header        Host            $host; 
proxy_set_header        X-Real-IP       $remote_addr; 
proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for; 
client_max_body_size    10m; 
client_body_buffer_size 128k; 
proxy_connect_timeout   90; 
proxy_send_timeout      90; 
proxy_read_timeout      90; 
proxy_buffers           32 4k; 
測試配置文件 
[root@test conf]# /usr/local/nginx/sbin/nginx -t 
2008/05/04 15:40:02 [info] 2363#0: the configuration file /usr/local/nginx/conf/nginx.conf syntax is  

ok 
2008/05/04 15:40:02 [info] 2363#0: the configuration file /usr/local/nginx/conf/nginx.conf was tested  

successfully 
啟動(dòng) 
[root@test conf]# /usr/local/nginx/sbin/nginx 
[root@test conf]# ps fax 
9400        Ss     0:00 nginx: master process /usr/local/nginx/sbin/nginx 
 9401             0:00  \_ nginx: worker process       
 9402             0:00  \_ nginx: worker process   

http://192.168.1.250:81/NginxStatus 
Active connections:  
server accepts handled requests 
11  
Reading: Writing: Waiting:    


http://192.168.1.250:81就可以訪問我的頁面了用著個(gè)nignx+tomcat來替代apache+jk+tomcat 
同樣的可以讓squid來監(jiān)聽80端口 這樣就透明代理了 
查看服務(wù)器信息 
[root@test conf]# curl -I http://localhost 
HTTP/1.0 200 OK 
Server: nginx/0.6.26 
Date: Sun, 04 May 2008 07:18:27 GMT 
Content-Type: text/html;charset=GBK 
Set-Cookie: JSESSIONID=0CE2D90115EFDE9830215A55414BF11F; Path=/ 
X-Cache: MISS from test.suantop.com 
Via: 1.0 test.abc.com (squid/3.0.STABLE2) 
Connection: close

轉(zhuǎn)自:http://www.suantop.com/post.do?m=show&id=53089

本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
3、單機(jī)運(yùn)行環(huán)境搭建之 --CentOS 安裝tengine
CentOS6.5安裝nginx及負(fù)載均衡配置
CentOS 5.5 Nginx+JDK+MySQL+Tomcat(jsp)
nginx下目錄瀏覽及其驗(yàn)證功能、版本隱藏等配置記錄
使用Nginx反向代理和proxy
CentOS 7.3 安裝配置 Nginx
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服