0

I have a working Pentaho 6.1 installation that will be exposed to the internet over Apache (that is 99% done). I'm having problems with changing the context of the default /pentaho app to /. I found some how-tos, but none helped:

The final product should be Pentaho on https://www.domain.com and not on https://www.domain.com/pentaho

Ty very much

JohnnyP
  • 33
  • 8
  • You need to change the document root in Apache. – Tero Kilkanen Nov 17 '16 at 15:57
  • When i try to do that over Apache (ProxyPass and ProxyPassReverse to /) i get a to many redirects error. – JohnnyP Nov 17 '16 at 21:16
  • Please include the Apache configuration. – Tero Kilkanen Nov 17 '16 at 23:13
  • ... 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] RewriteCond %{REQUEST_URI} ^/(/pentaho)$ RewriteRule ^(.*)$ https://%{HTTP_HOST}$1/ [R=301,L] RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} – JohnnyP Nov 18 '16 at 07:47
  • This is my conf now, that works (although RewriteCond %{HTTPS} off is not working). When i try to remove /pentaho from ProxyPass /pentaho and go to /, i get To many redirects. – JohnnyP Nov 18 '16 at 07:50
  • 1
    Please put the configuration in the question itself, it is too difficult to read from the comments. – Tero Kilkanen Nov 18 '16 at 13:23
  • Sry for not commenting sooner, it's been busy. I managed to solve the issue on the apache side. I'll post an answer with my full configuration. It might come in handy for someone wanting to solve the same thing as me. – JohnnyP Nov 23 '16 at 07:30

1 Answers1

0

So, my full apache configuration that solved my problem:

<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>

It might not look pretty, but it does the job. Hope it helps someone.

JohnnyP
  • 33
  • 8