python - 无法转发用户提交的查询参数
问题描述
我想转发在浏览器中输入的请求,例如:
example.com/?wid=23&lang=en
到在不同端口上运行的服务器,例如:
http://localhost:3001/?wid=23&lang=en
我怎么能这样做?
我在 apache 中添加了一个 VirtualHost,如下所示:
<VirtualHost *:80>
#ServerName www.example.com
ServerAdmin webmaster@example.com
ServerName example.com
ServerAlias example.com
ProxyPass / http://localhost:3001/
ProxyPassReverse / http://localhost:3001/
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
但我不知道如何将查询参数传递给在不同端口上运行的 Nodejs 应用程序。
解决方案
推荐阅读
- swift - 像 UITextField 一样的选框
- perl - 在perl中将零附加到整数变量
- java - 为什么我们需要接口,而我们可以对类本身做同样的事情?
- javascript - 将 yAxis 标签作为 xAxis 类别的 10%
- javascript - 如何在数据表中具有动态模态
- php - Symfony 中同一防火墙的匿名用户和经过身份验证的用户
- sql - 如何修复我的 StoredProcedure 以获取 isActive=1 的记录,并且如果 IsActive=0 还从同一用户获取记录
- nsbundle - 我可以在 macOS App Store 中的应用程序之间迁移购买吗?
- php - Google 计算引擎实例使用 api 启动/状态/停止
- python - 我使用 Flask 编写了一个小型 Web 代码,并在浏览器中输入了 http://127.0.0.1:5000/ 但它正在运行一些其他代码如何解决这个问题?