Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reverse_proxy.cd 中有个链接失效了 #220

Closed
NominationP opened this issue Sep 5, 2017 · 3 comments
Closed

reverse_proxy.cd 中有个链接失效了 #220

NominationP opened this issue Sep 5, 2017 · 3 comments

Comments

@NominationP
Copy link

(1) location

location 项对请求 URI 进行匹配,location 后面配置了匹配规则。例如上面的例子中,如果请求的 URI 是 localhost/,则会匹配 location / 这一项;如果请求的 URI 是 localhost/README.md,则会匹配 location /README.md 这项。

上面这个例子只是针对一个确定的 URI 做了反向代理,有的读者会有疑惑:如果对每个页面都进行这样的配置,那将会大量重复,能否做 批量 配置呢?此时需要配合使用 location 的正则匹配功能。具体实现方法可参考本书的 **URL 匹配章节**。
@spacewander
Copy link
Collaborator

@NominationP
谢谢纠错。已经把失效的链接指向 Nginx 官方文档上关于 location 的描述了。
http://nginx.org/en/docs/http/ngx_http_core_module.html#location

@NominationP
Copy link
Author

NominationP commented Sep 6, 2017 via email

@NominationP
Copy link
Author

NominationP commented Sep 6, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants