• nginx配置、域名、前端代码部署


    服务器上部署nginx,部署多个独立的代码,用nginx做域名映射的配置方法:

    1. 修改/usr/local/nginx/conf/nginx.conf文件,重点是最后一行,include /data/nginx/conf/*vhost;
    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;
        keepalive_timeout  65;
    
        #gzip  on;
    
        include /data/nginx/conf/*vhost;
    }

      2. 在/data/nginx/conf/ 目录下创建不同的配置文件

      3.配置对应的配置文件,以hw.keplermarket.cn.vhost为例

    server{
        listen 80;
        server_name hw.keplermarket.cn;
    
        error_log   /data/nginx/logs/hw.keplermarket.cn/error.log;
        location / {
            root       /data/deploy/hw.keplermarket.cn/;
            access_log /data/nginx/logs/hw.keplermarket.cn/access.log main;
            try_files  $uri $uri/ /index.html;
        }
    }
    

      4.放置发布的代码到对应的目录,例如 /data/deploy/hw.keplermarket.cn/ 下放置相应的代码

  • 相关阅读:
    SAP应用真的不性感么
    从ABAP Netweaver的SICF到SAP Kyma的Lambda Function
    WordPress,SAP Kyma和微信三者的集成
    SAP官方发布的ABAP编程规范
    SAP官方提供的人脸识别API
    第三方应用如何在SAP Kyma上进行服务注册
    Just a Hook
    Backward Digit Sums
    Balanced Substring
    hdu 1358 Period
  • 原文地址:https://www.cnblogs.com/yanghaifeng/p/10595032.html
Copyright © 2020-2023  润新知