Hello all.
I'm new to this maillinglist as to nginx as well. I setup a nginx to run as
a loadbalancer with just adding the following lines to my
/etc/nginx/nginx_conf. This config works fine.
http {
upstream loadbalancer1 {
server 192.168.0.1:80;
server 192.168.0.2:80;
}
server {
listen 80;
server_name www.example.com example.com;
location / {
proxy_pass http://loadbalancer1;
}
}
Please note, that example.com isn't my real domain. So that's not the error. ;-)
Now I tried to add a second site which is hosted on two different
webservers. My configuration in /etc/nginx/nginx_conf looks like the
following now.
http {
upstream loadbalancer1 {
server 192.168.0.1:80;
server 192.168.0.2:80;
}
server {
listen 80;
server_name www.example.com example.com;
location / {
proxy_pass http://loadbalancer1;
}
}
upstream loadbalancer2 {
server 192.168.0.3:80;
server 192.168.0.4:80;
}
server {
listen 80;
server_name www.anyway.com anyway.com;
location / {
proxy_pass http://loadbalancer2;
}
}}
But if I try to get www.anyway.com it didn't work and I got a request
timeout. Could somebody please tell me, what's wrong with my
configuration?
Best Regards
Joerg
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx