1、项目部署的nginx。conf文件配置:、

    

      server {
              # 监听在80端口
              listen 80;

              # 主机地址
        server_name 39.108.89.249;

        # 如果有域名,可以使用域名代替主机地址
      #       server_name www.blog.com blog.com;


           # 接下来的都是路由派发

      # 访问路由就是主机地址时(反向代理)
      location /axf {
              #root /apps/www/MyBlog;
              #index app/templates/main/index.html;

              # 反向代理监听在127.0.0.1:8000位置的uwsgi服务器
              # 前提是uwsgi已经运行并监听在8000端口
              include uwsgi_params;
              uwsgi_pass 127.0.0.1:8000;
      }

      # 访问路由就是主机地址时(反向代理)
      location /blog {
              #root /apps/www/MyBlog;
              #index app/templates/main/index.html;

              # 反向代理监听在127.0.0.1:5001位置的uwsgi服务器
              # 前提是uwsgi已经运行并监听在8000端口
              include uwsgi_params;
              uwsgi_pass 127.0.0.1:5001;
      }

      # 访问静态资源(正向代理)
           location /static {
         #root html/blog;

         # 静态资源目录
          alias /apps/www/Aixianfeng/static;
      }


# 访问指定文件夹下的任意资源(正向代理)
location /fresh{
   alias /apps/www/fresh;

   # 默认访问某个页面
   index index.html;
}

# 纯前端小游戏(正向代理)
location /2048{
   alias /apps/www/2048;
   index index.html;
}

  }

2、项目部署的整体分析。

项目部署的相关配置及API

项目部署的相关配置及API

项目部署的相关配置及API

项目部署的相关配置及API

项目部署的相关配置及API

项目部署的相关配置及API

项目部署的相关配置及API

项目部署的相关配置及API





相关文章: