下面的方法 ,我想代理stream量的地址/应用程序由Tomcat 7处理。
我把这个添加到我的httpd.conf中:
LoadModule proxy_module {path-to-modules}/mod_proxy.so LoadModule deflate_module modules/mod_deflate.so ProxyPass /app http://localhost:8081 ProxyPassReverse /app http://localhost:8081
我也有这个在我的server.xml:
<Connector port="8081" enableLookups="false" acceptCount="100" connectionTimeout="20000" proxyName="localhost" proxyPort="80"/>
我的应用程序文件夹是/var/lib/tomcat7/webapps/app 。
完成上述configuration后,我重新启动了Tomcat 7和Apache 2。
问题:导航到我的webpage.com/app时,出现错误500.我咨询了apache日志,它说:
[warn] proxy: No protocol handler was valid for the URL /app. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule.
更新:这是在Ubuntu的运行。 我通过将LoadModule proxy_http_module modules/mod_proxy_http.so添加到我的httpd.conf来解决此问题。
现在我还有一个问题:如何使这个代理通过端口443在SSL上工作?