• Nginx笔记总结一:基本安装和配置


    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 1;
      error_log logs/error.log notice;
      pid logs/nginx.pid;
      events {
        worker_connections 1024;
        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 0;
        gzip on;
    
    
        upstream proxy1 {
          server 192.168.89.10:180;
        }
        upstream proxy2 {
          server 192.168.89.10:280;
        }
    
    
        server {
          listen 80;
          server_name www1.dlab.com;
          location / {
            proxy_pass http://proxy1;
          }
        }
    
    
        server {
          listen 80;
          server_name www2.dlab.com;
          location / {
            proxy_pass http://proxy2;
          }
        }
      }
  • 相关阅读:
    微信小程序 使用async await
    CSS currentColor 变量的使用
    wn.run万能命令
    (13)浮动布局(控制盒模型在页面的什么位置 什么是清浮动)
    (0)前端总结(HTML + CSS + JQ)
    (12)页面的布局(浮动布局)
    (11)盒模型
    (10)背景图片操作
    (9)字体操作
    (8)伪类选择器和鼠标悬停动画效果
  • 原文地址:https://www.cnblogs.com/djoker/p/6381779.html
Copyright © 2020-2023  润新知