我有一个可以运行的 Pentaho 6.1 安装,它将通过 Apache 暴露给互联网(已完成 99%)。我在将默认 /pentaho 应用程序的上下文更改为 / 时遇到了问题。我找到了一些操作方法,但都没有帮助:
- https://help.pentaho.com/Documentation/6.1/0P0/000/050- 更改 Tomcat 上的 Web 应用程序名称 - 这是主要参考。
最终产品应该是 Pentahohttps://www.domain.com而不是https://www.domain.com/pentaho
非常感谢
答案1
因此,我的完整 apache 配置解决了我的问题:
<VirtualHost *:80>
ServerName www.domain.com
Redirect permanent / https://www.domain.com/
</VirtualHost>
<VirtualHost _default_:443>
ServerName www.domain.com
SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH:ECDHE-RSA-AES128-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA128:DHE-RSA-AES128-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES128-GCM-SHA128:ECDHE-RSA-AES128-SHA384:ECDHE-RSA-AES128-SHA128:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES128-SHA128:DHE-RSA-AES128-SHA128:DHE-RSA-AES128-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA384:AES128-GCM-SHA128:AES128-SHA128:AES128-SHA128:AES128-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4
SSLProtocol All -SSLv2 -SSLv3
SSLHonorCipherOrder On
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/crt.crt
SSLCertificateKeyFile /etc/apache2/ssl/crt.key
SSLCertificateChainFile /etc/apache2/ssl/crt-ca.crt
ProxyPreserveHost On
ProxyRequests Off
RewriteEngine On
ProxyPass /pentaho ajp://localhost:8009/pentaho/
ProxyPassReverse /pentaho ajp://localhost/8009/pentaho/
RewriteRule /pentaho/(.*)$ ajp://localhost:8009/pentaho/$1 [P]
RewriteRule ^/$ /pentaho [R]
RewriteRule ^/(.*);jsessionid= https://%{HTTP_HOST}$1/ [R=301,L]
RewriteCond %{REQUEST_URI} ^/(pentaho)$
RewriteRule ^(.*)$ https://%{HTTP_HOST}$1/ [R=301,L]
</Virtualhost>
虽然看上去不太美观,但确实有用。希望它能帮到别人。