当前位置:   article > 正文

nginx 部署 二级访问目录_nginx 二级目录

nginx 二级目录

nginx 部署 二级访问目录

nginx 配置 windows

server {
    listen        80;
    server_name  web.ttt.com;
    
    
    ## web1
    location / {
        root   "D:/phpstudy_pro/WWW/web1";
        index index.html;
        try_files $uri $uri/ /index.html;
    }

    ## api 配置
    location  ~/api {
        rewrite ^/api/(.*)$ /$1 break;
        proxy_set_header Host $host;
        proxy_pass_header User-Agent;
        ## 代理到后台接口
        proxy_pass http://127.0.0.1:9090;
    }
    
	## web2
    location /web2 {
        alias   "D:\phpstudy_pro\WWW\web2";
        index index.html;
        try_files $uri $uri/ /index.html;
    }

    

    
}
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32

打包页面可能存在问题的地方

在这里插入图片描述

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/weixin_40725706/article/detail/254188
推荐阅读
相关标签
  

闽ICP备14008679号