将nginx设置为负载均衡器

时间:2017-03-11 05:30:01

标签: wordpress nginx

我在localhost上运行了一个灯堆,我已经安装了wordpress。 我在localhost上设置apache,监听两个端口8080和8090。 现在,我需要在负载均衡器的基础上设置nginx,我得到302个错误。

请帮忙

Nginx配置:

 upstream backend  {
   server 127.0.0.1:8080;
   server 127.0.0.1:8090;
 }
server {

   listen       80;
   server_name  localhost;

  location /wp-admin/ {
     proxy_pass  http://backend;
  }
}
来自access.log的

错误:

x.x.x.x - - [11/Mar/2017:05:33:42 +0000] "GET /wp-admin/ HTTP/1.1" 302 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/x.x.x.x Safari/537.36" "-"

0 个答案:

没有答案
相关问题