运维笔记-----nginx反向代理
在/opt/nginx 下的配置文件同级建立反向代理的配置文件manager.conf
<span style="font-size:18px;">user nobody;
worker_processes 4;
events{
worker_connections 1024;
}
http{
upstream manager{
#server 192.168.1.13;
server 57.23.5.12;
server 69.52.46.2;
}
server {
listen 8080;
location / {
proxy_pass http://manager;
}
}
}
</span>
开启nginx 服务
./nginx -c /root/local/nginx/conf/manager.conf
这样访问 本机的127.0.0.1:8080端口的时候,就会随机的访问 42.156.142.7 61.129.48.158