【发布时间】:2020-07-13 12:29:09
【问题描述】:
下面是我正在运行的 nginx.conf 文件,也就是说,当我在我的 VPC 中点击 tester.us-east-2.elb.amazonaws.com 时,我可以将我的请求路由到 github.com,但我想要让我的 tester.us-east-2.elb.amazonaws.com/github 更重要地指向 github.com。我尝试摆弄 conf 文件,但未能成功。有人可以帮忙吗?
listen 80;
server_name tester.us-east-2.elb.amazonaws.com;
location / {
proxy_pass https://github.com;
proxy_redirect http://tester.us-east-2.elb.amazonaws.com/ https://github.com;
}
location = /40x.html {
}
【问题讨论】:
-
你想重定向到 githubhub.com 吗?
标签: nginx nginx-reverse-proxy nginx-config