设置
AWS将来自example.com/(internalIP)的请求转发到nginx池。Nginx将不得不抓取该url (example.com/内在to ),并将请求转发给特定的"internalIP“。
nginx池需要有internet访问(安装在nginx ec2上的安全工具需要它),所以我不能将nginx池的aws安全组限制在私有ip的特定子网上。
问题
考虑到这种设置,我需要找到一个nginx配置,它只会转发到私有ips的特定子网。这将避免使用任何私有ip访问我们的基础设施。
发布于 2022-02-21 10:16:58
用这个解决了它:
...
location ~* regexPattern {
...
proxy_pass http://\$1:<PORT>/\$4;
}
}
...https://stackoverflow.com/questions/71157140
复制相似问题