2010年12月6日月曜日

Nginx (Load balancer)

I installed Nginx on Debian. I’ve written the installation document below. Please give me advice/suggestions on it. I would appreciate any kind of advice/suggestion!

= Nginx Load balancer on Debin


> aptitude install nginx

> vi /etc/nginx/sites-enabled/default

## ADD upstream for load balancer ##
upstream backend {
server 192.168.0.10 weight=5;
server 192.168.0.11 weight=2;
}

server {
listen 80;
server_name localhost;

access_log /var/log/nginx/localhost.access.log;

location / {
#root /var/www/nginx-default; ##comment out
#index index.html index.htm; ##comment out
proxy_pass http://backend; ##ADD
}



> /etc/init.d/nginx restart

コメント:

コメントを投稿

登録 コメントの投稿 [Atom]





<< ホーム

This page is powered by Blogger. Isn't yours?

登録 投稿 [Atom]