• node项目配置成nginx启动


    node项目配置成nginx启动

    1、新建ant.conf

    upstream antNodeJs{
        server 127.0.0.1:8000;
        keepalive 64;
    }
    
    server
        {
            listen 80;
            #listen [::]:80 default_server ipv6only=on;
            server_name jiqing.ant.com;
            
            location / {
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header Host  $http_host;
                proxy_set_header X-Nginx-Proxy true;
                proxy_set_header Connection "";
                proxy_pass      http://antNodeJs;
    
            }
    
            location ~ /.
            {
                deny all;
            }
    
            access_log  /home/wwwlogs/access.log;
    }
    

    2、修改hosts

    127.0.0.1   jiqing.ant.com
    

    3、重启nginx

    sudo lnmp restart
    

  • 相关阅读:
    面向对象之继承
    面向对象之封装
    面向对象编程
    Centos7.7镜像源配置
    Centos7环境配置
    多表查询v1
    多表查询
    库相关操作
    数据库初识
    数据相关操作
  • 原文地址:https://www.cnblogs.com/jiqing9006/p/10504662.html
Copyright © 2020-2023  润新知