← 返回首页
window下nginx部署多个静态web项目
发表时间:2019-12-04 20:51:30
讲解window下如何nginx部署多个静态web项目

1.项目部署目录结构

2.修改ngnix.conf


#sever下添加

location /admin {
    alias   C:/nginx-1.17.6/html/admin;
    index  index.html index.htm;
}

location /blog {
    alias   C:/nginx-1.17.6/html/blog;
    index  index.html index.htm;
}

3.重启nginx测试 分别测试: http://localhost/ -----> 显示服务器首页 http://localhost/admin -----> 显示后台管理首页 http://localhost/blog -----> 显示博客首页