LoadBalancer配置

时间:2013-11-15 12:35:46

标签: apache nginx load-balancing

我的设置在这里

server {
  listen 80;
  server_name *.amvertising.com;
  location / {
    # needed to forward user's IP address to rails
    proxy_set_header  X-Real-IP  $remote_addr;
    # needed for HTTPS
    proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;
    proxy_redirect off;
    proxy_max_temp_file_size 0;
    proxy_pass http://mysite;
  } #end location
} #end server

现在我只想给出

server_name *;

有可能请帮帮我

1 个答案:

答案 0 :(得分:0)

如果你希望这是你的捕获,那么使用

server {
    listen 80 default_server;
    #the rest of the configuration
}