需要在Apache的配置文件中添加ProxyPassReverse指令以解决此问题。
例如,若希望将所有来自http://example.com/app的请求反向代理到http://localhost:3000/app下,则可在Apache的虚拟主机配置中加入以下代码:
ServerName example.com
# Reverse proxy settings
ProxyPreserveHost On
ProxyPass /app http://localhost:3000/app
ProxyPassReverse /app http://localhost:3000/app
重启Apache服务后,再尝试访问http://example.com/app,应该能够成功地将请求代理到http://localhost:3000/app中。