Nginx / Lighttpd 역방향 프 록 시 설치

3237 단어 lighttpdnginx
더 읽 기
            :99uc.net    :          :2009-11-20 22:41:17                     Web   ,     Reverse
Proxy  Squid、Apache、Lighttpd、Nginx ,                           ,             ( proxy                 Web      )

    
    : Debian 4.0 r3
Kernel:
2.6.18-6-686

    
nginx-0.6.31.tar.gz
lighttpd-1.4.19.tar.gz

    
  nginx      
#
tar zxvf nginx-0.6.31.tar.gz
# cd nginx-0.6.31
# ./configure
–prefix=/usr/local/nginx –with-http_realip_module
# make && make
install
# vi /usr/local/nginx/conf/nginx.conf

        location /
{
            proxy_pass         http://10.10.10.87/;
           
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_buffer_size          4k;
            proxy_buffers              4
32k;
            proxy_busy_buffers_size    64k;
           
proxy_temp_file_write_size 64k;
        }

        # Static files
location
        location ~*
^.+.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js|htm|html)$
{
            root   /srv/www/htdocs/;
        }

  nginx
#
/usr/local/nginx/sbin/nginx

  lighttpd      
# tar zxvf
lighttpd-1.4.19.tar.gz
# cd lighttpd-1.4.19
# ./configure
–prefix=/usr/loca/lighttpd –without-bzip2
# make && make
install
# cp doc/lighttpd.conf /etc/lighttpd.conf
# vi
/etc/lighttpd.conf

server.modules              =
(
                               
“mod_access”,
                               
“mod_status”,
                               
“mod_proxy”,
                                “mod_accesslog”
)

server.document-root        =
“/srv/www/htdocs/”

server.errorlog             =
“/var/log/lighttpd/error.log”

status.status-url =
“/server-status”

$HTTP["url"] !~
“\.(js|css|gif|jpg|png|ico|txt|swf|html|htm)$” {
     proxy.server  = ( “”
=> (
     ( “host” => “10.10.10.87″, “port” => 80 )
     
)
    )
}

  lighttpd
# /usr/local/lighttpd/sbin/lighttpd -f
/etc/lighttpd.conf

    
http://www.mysqlperformanceblog.com/2008/06/17/lighttpd-as-reverse-proxy/
http://blog.kovyrin.net/2006/05/18/nginx-as-reverse-proxy/
http://www.mysqlperformanceblog.com/2006/05/21/speedup-your-lamp-stack-with-lighttpd/

http://blog.kovyrin.net/2006/04/17/typical-nginx-configurations/

좋은 웹페이지 즐겨찾기