Skip to content

Instantly share code, notes, and snippets.

@selvait90
Last active August 9, 2020 00:02
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save selvait90/ebe947b3690015871830 to your computer and use it in GitHub Desktop.
Save selvait90/ebe947b3690015871830 to your computer and use it in GitHub Desktop.
Enable https on Pentaho BA Server using nginx Reverse Proxy
I am trying to enable https for the Pentaho BA Server using nginx reverse proxy.
I have posted the tomcat and nginx configurations in below.
I am able to access the Pentaho BA server login page https://test.mydomain.org/pentaho-test/Login
But when i tried to login with right credentials, I am getting the Mixed content error(http & https) in browser.
Please help to handle this
Browser Error:
Mixed Content: The page at 'https://test.mydomain.org/pentaho-test/Login' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://test.mydomain.org/pentaho-test/Home?locale=en_US'. This request has been blocked; the content must be served over HTTPS.
upstream test_pentaho_servers {
server testmydomain.com:18080 fail_timeout=0;
}
server {
listen 80;
listen [::]:80;
server_name test.mydomain.org;
rewrite ^ https://test.mydomain.org$request_uri? permanent;
}
server {
listen 443 default_server;
listen [::]:443 ipv6only=on default_server;
client_max_body_size 4G;
server_name test.mydomain.org;
access_log /var/log/nginx/sites/test.mydomain.org/access.log;
error_log /var/log/nginx/sites/test.mydomain.org/error.log;
# see https://wiki.mozilla.org/Security/Server_Side_TLS
ssl_certificate ssl/test.mydomain.org.crt;
ssl_certificate_key ssl/test.mydomain.org.key;
include ssl-parameters;
location /pentaho-test {
proxy_pass http://test_pentaho_servers/pentaho-test;
}
location /pentaho-style {
proxy_pass http://test_pentaho_servers/pentaho-style;
}
error_page 500 502 503 504 /500.html;
}
<Connector URIEncoding="UTF-8"
port="18080"
protocol="HTTP/1.1"
connectionTimeout="600000"
proxyName="test.mydomain.org"
proxyPort="443"
schema="https"
secure="true"
redirectPort="443"
/>
<context-param>
<param-name>fully-qualified-server-url</param-name>
<param-value>https://test.mydomain.org/pentaho-test/</param-value>
</context-param>
@robyviggy
Copy link

Hello!
This solved the problem for me:
https://wiki.bizcubed.com.au/xwiki/bin/view/Pentaho+Tutorial/NGiNX+Reverse+SSL+Proxy+for+Pentaho

in this example, 8008 is the default port for http requests, 80 is port where nginx reverse the traffic.

Sorry for bad english, I hope that helps.

    <Connector URIEncoding="UTF-8" port="8008" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />
    <!-- rviggiani aggiunta conf per reverse ssl-->
    <Connector port="80" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8008"
               proxyName="bi.example.it"
               proxyPort="443"
               scheme="https"
     />

Copy link

ghost commented Feb 27, 2020

Your solution works like a charm @robyviggy ! Thanks a lot, I've been struggling with this all day.

@ShonnyAIO
Copy link

Greetings, Only one question. The file of pentaho-server is only zip ? Because I try but the system said: Cuation, It is initializing, please not shut down or restart. If you can help me. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment