• nginx反向代理


    第一步:下载:http://openresty.org/cn/download.html

    第二步:解压->conf->nginx.conf里面的注释全部删除(方便阅读)

    worker_processes  1;
    
    events {
        worker_connections  1024;
    }
    
    
    http {
        include       mime.types;
        # default_type  application/octet-stream;        
        default_type text/html;
    
        sendfile        on;
        keepalive_timeout  65;
        server {
            listen       5100;
            server_name  127.0.0.2;
            default_type text/html;
            location / {
                root   C:UsersuserDesktop;
                # index  index.html index.htm;
            }
            location /v/ {
                proxy_pass http://127.0.0.1:5000/;
            }
    
            location ~ .*.(gif|jpg|jpeg|png)$ {
                root D:/date_set/manhua/fox_red/;
            }
            error_page   500 502 503 504  /50x.html;
            location = /50x.html {
                root   html;
            }
        }
    }
    

      

    常用指令:

    # 启动nginx服务器
    nginx
    
     
    
    # 强制停止nginx服务器,如果有未处理的数据,丢弃
    nginx -s stop
    
     
    
    # 优雅的停止nginx服务器,如果有未处理的数据,等待处理完成之后停止
    nginx -s quit
    
     
    
    # 查看nginx进程是否启动 
    ps -ef|grep nginx
    
     
    
    # 重新载入配置文件
    nginx -s reload 
    
     
    
    # 重启 Nginx
    nginx -s reopen 
    

      

  • 相关阅读:
    Ionic开发手机App常用的软件
    Windows的Ionic环境配置
    百度静态资源公共库
    我的程序员之路
    angular.bind
    响应式布局之使用bootstrap
    初识bootstrap
    使用css3实现响应式布局
    mysql-阅读笔记1
    mysql优化
  • 原文地址:https://www.cnblogs.com/chargeworld/p/12372026.html
Copyright © 2020-2023  润新知