- 简单代理:
server {
listen 8360;
server_name 192.168.248.128;
location / {
proxy_pass http://www.qq.com; //输入localhost:8360 访问qq主页
# root /my_blog/crm/;
# index index.html;
}
}
- 负载均衡:
upstream httpList{
server 192.168.248.128:8088;
server 192.168.248.128:8089;
}
server {
listen 8360;
server_name 192.168.248.128;
location / {
proxy_pass http://www.httpList;
# root /my_blog/crm/;
# index index.html;
}
}
httpList{
}
server {
listen 8360;
server_name 192.168.248.128;
location / {
proxy_pass http://httpList;
# root /my_blog/crm/;
# index index.html;
}
}