​11月29日任务

12.17 Nginx负载均衡

12.18 ssl原理

12.19 生成ssl密钥对

12.20 Nginx配置ssl

12.17 Nginx负载均衡

  • vim /usr/local/nginx/conf/vhost/load.conf // 写入如下内容

upstream qq_com
{
    ip_hash;
    server 61.135.157.156:80;
    server 125.39.240.113:80;
}
server
{
    listen 80;
    server_name www.qq.com;
    location /
    {
        proxy_pass      http://qq_com;
        proxy_set_header Host   $host;
        proxy_set_header X-Real-IP      $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}

  •  upstream来指定多个web server
12-02 11:23