1. Nginx安装
  下载地址和安装依赖包
    http://nginx.org/download/nginx-1.9.14.tar.gz
    yum -y install pcre pcre-devel zlib-devel openssl*
  编译安装
    ./configure --prefix=/usr/local/nginx \
    --with-http_ssl_module \
    --with-http_stub_status_module \
    --with-pcre
  启动,关闭,重启
    /usr/local/nginx/sbin/nginx 启动
    /usr/local/nginx/sbin/nginx -s stop 关闭
    /usr/local/nginx/sbin/nginx -s reload 重启
    /usr/local/nginx/sbin/nginx -t 检查配置
  配置文件
  

user nobody;
  worker_processes ;
  error_log logs/error.log notice;
  pid logs/nginx.pid;
  events {
    worker_connections ;
    use epoll;
  }
  http {
    include mime.types;
    default_type application/octet-stream;
    log_format main '$remote_addr - $remote_user [$time_local] "$request" '
              '$status $body_bytes_sent "$http_referer" '
              '"$http_user_agent" "$http_x_forwarded_for"';
    access_log logs/access.log main;
    sendfile on;
    tcp_nopush on;
    keepalive_timeout ;
    gzip on;     upstream proxy1 {
      server 192.168.89.10:;
    }
    upstream proxy2 {
      server 192.168.89.10:;
    }     server {
      listen ;
      server_name www1.dlab.com;
      location / {
        proxy_pass http://proxy1;
      }
    }     server {
      listen ;
      server_name www2.dlab.com;
      location / {
        proxy_pass http://proxy2;
      }
    }
  }

最新文章

  1. Maven之构件
  2. python征程2.0(python基础)
  3. zk textbox 更改字体大小及高度
  4. 关键字volatile
  5. [爬虫资源]各大爬虫资源大汇总,做我们自己的awesome系列
  6. Minimum Height Trees
  7. 安装 chardet ,出现ImportError: No module named setuptools
  8. hash表的建立和查找
  9. ui router digest 10 time
  10. android入门——UI(4)
  11. jQuery EasyUI 数字框(NumberBox)用法
  12. HTML5游戏开发引擎Pixi.js完全入门手册(二)元素对象属性解析
  13. 记录一个 spring cloud 配置中心的坑,命令行端口参数无效,被覆盖,编码集问题无法读取文件等.
  14. 冲刺NO.7
  15. C语言复习0_准备工作
  16. gsoap内存管理与释放
  17. Excel数据与DateTable数据的转换
  18. Chrome中无法断点调试的解决方案
  19. C#集合Collections购物车Shopping Cart
  20. 浅谈分词算法(4)基于字的分词方法(CRF)

热门文章

  1. 计蒜客 蒜头君回家(有条件的BFS)
  2. 用IMX6开发板创建Android模拟器
  3. Java线程(一)——创建线程的两种方法
  4. 吴裕雄--天生自然Linux操作系统:Linux 远程登录
  5. flask汇总
  6. Servlet&JSP复习笔记 03
  7. Python 处理图片 -- pillow库
  8. macOS更新失败解决
  9. jupyterhub 安装配置
  10. Java之关键字abstract(抽象类与抽象方法)