首页 > 其他 > 详细

nginx 配置root,alias,proxy

时间:2020-07-10 20:22:09      阅读:63      评论:0      收藏:0      [点我收藏+]

nginx配置

参考文档地址

http://nginx.org/en/docs/

Syntax: location [ = | ~ | ~* | ^~ ] uri { ... }

root

// 请求 /my -----> nginx/html/my/index.html
location /my {
root html;
index index.html;
}

alias

// 请求 /my -----> nginx /html/index.html
location /my {
alias html;
index index.html;
}

proxy

// 请求 /good -----> 指向 ip服务地址
location /good {
proxy_pass http://ip/;
}

nginx 配置root,alias,proxy

原文:https://www.cnblogs.com/pengsn/p/13280209.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!