vim upstream_test.conf
upstream imooc {
server 116.62.103.228:8001;
server 116.62.103.228:8002;
server 116.62.103.228:8003;
}
server {
listen 80;
server_name localhost jeson.t.imooc.io;
access_log /var/log/nginx/test_proxy.access.log main;
location / {
proxy_pass http://imooc;
include proxy_params;
}
#error_page 404 /404.html;
# redirect server error pages to static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
没有帐号? 立即注册