我正在运行一个Ubuntu13.04 64位服务器,在该服务器上运行一些无头VirtualBox VM。在过去,我只是转发端口来手动访问VM,但是我希望使用Guacamole来合并内容。我让apache充当我服务器上几乎所有服务的代理,并提供如下内容:
<VirtualHost *:80>
ProxyPreserveHost On
ProxyRequests Off
ServerName dynmap.address.net
ServerAlias dynmap.address.org
ProxyPass / http://localhost:8123/
ProxyPassReverse / http://localhost:8123/
</VirtualHost>工作正常,但是这个配置(基于http://guac-dev.org/doc/gug/installing-guacamole.html的说明)似乎不起作用:
<VirtualHost *:80>
ProxyPreserveHost On
ProxyRequests Off
ServerName rdp.address.net
ServerAlias rdp.address.org
ProxyPass / ajp://localhost:8009/guacamole/ max=20 flushpackets=on
ProxyPassReverse / ajp://localhost:8009/guacamole/
ProxyPassReverseCookiePath /guacamole /
</VirtualHost>在访问ServerName时,我得到一个通用的“500InternalServer错误”,/var/log/apache2/error.log只是添加了以下一行:
[warn] proxy: No protocol handler was valid for the URL /. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule.到目前为止,我的googling表示这意味着代理模块没有加载,但我已经确认代理、proxy_http和proxy_html都已加载。
编辑:意识到我在ProxyPassReverse上有错误的端口,但这并没有解决问题。
发布于 2013-11-07 22:00:16
从您提供的文档来看,您的配置中如下所示:
ProxyPass / ajp://localhost:8009/guacamole/ max=20 flushpackets=on
ProxyPassReverse / ajp://localhost:8009/guacamole/实际上应该是这样:
ProxyPass ajp://localhost:8009/guacamole/ max=20 flushpackets=on
ProxyPassReverse ajp://localhost:8009/guacamole/你有一些额外的斜线在周围徘徊,造成问题。
(注意,这取决于您是否在VirtualHost或Location标记中使用它)。
https://serverfault.com/questions/551159
复制相似问题