【发布时间】:2017-03-15 00:58:24
【问题描述】:
我有一个基于 PHP / Apache 的网站,我想在 div 区域内插入一个 NodeJs 应用程序,我已经将它显示在 iframe 中,如下所示:
<iframe src="http://example.com:8080"></iframe>
我使用下面的代码尝试了 ProxyPass 和 ProxyPassReverse,但它只重定向到我的 nodeJs 应用程序,而 apache 配置文件中没有我的 PHP 站点 /etc/apache2/sites-available/exemple.conf。
ProxyRequests off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
<Location />
ProxyPass http://localhost:8080/
ProxyPassReverse http://localhost:8080/
</Location>
我怎样才能正确地做到这一点。
【问题讨论】: