apache2 - Apache2 Proxy Pass 包括 URL 上的所有参数
问题描述
是否可以在 Apache2 上进行代理传递,它还携带传递给后端服务器的参数?
例子:
www.frontserver.com -> www.frontserver.com (meaning that on the base directory it will not be proxied to any backend servers.)
如果它在 /_nuxt 目录下,它将被代理
www.frontserver.com/_nuxt/index.js -> backserver.com/_nuxt/index.js (dynamicaly)
解决方案
您可以使用匹配正则表达式的ProxyPassMatch
ProxyPassMatch "^_nuxt/(.*)" "http://backserver.com/_nuxt/$1"
推荐阅读
- ruby-on-rails - 如何修复“无法在 Heroku 上部署应用程序”?
- python - 用scrapy爬行 - bson.errors.InvalidDocument:无法编码对象
- racket - DrRacket - 使用 lambda 生成具有相同元素的列表
- rust - 使用 iter.map,为什么闭包可以工作,但直接传递函数却不行?
- javascript - 有没有办法将数据从 javascript 发送到 exe 文件
- c++ - g++ 和 g++14 的未初始化值的差异
- php - WordPress 模板中的 AJAX 在 WordPress 插件类中不起作用
- forms - AEM Forms 将 JEE 升级到 OSGI
- python - 如何在python中使用多个索引同时填充numpy数组
- c# - mysql权限错误。涉及 SELECT 命令