Pentaho Server Configuration In Nginx With Mutiple Domain and Same Context Name

Blog-Featured-Image-images

Pentaho Server Configuration : Nginx with Multiple Domains

Nginx reverse proxy configuration enables multiple domain access to Pentaho 10.2 BA Server, providing flexible routing and load distribution. This configuration supports both traditional on-premises deployments and modern containerized environments.

Learn about Pentaho API commands or explore Pentaho Webspoon deployment challenges for comprehensive configuration solutions.

  • Load balancing: Distribute requests across multiple Pentaho instances
  • SSL termination: Centralize SSL/TLS handling at the Nginx level
  • Flexible routing: Route different domains to different Pentaho instances
  • Modern deployment: Support for Docker and Kubernetes deployments

Below are the steps to configure Pentaho 10.2 BA server using Nginx with multiple domains. Pentaho 10.2 supports modern deployment options including Docker containers, Kubernetes orchestration, and cloud-native architectures, providing additional flexibility beyond traditional Nginx reverse proxy configurations.

Key improvements in Pentaho 10.2:

  • Docker container support for consistent deployments
  • Kubernetes orchestration for auto-scaling and load balancing
  • Enhanced performance with Java 17 (2-3x faster)
  • Cloud-native architecture support
  • Improved security and SSL/TLS handling
  • Better health checks and monitoring

Traditional Nginx Configuration (On-Premises/VM Deployment)

Create multiple domains:

  1. In the system which hosts Nginx, open hosts file and create two new domains with your own name. Below is the command to open hosts file.
vi /etc/hosts

Add the following entries:

IP (Host Server IP) Domain name 1
IP (Host Server IP) Domain name 2
  1. In the IP replace your Host server IP and in Domain name1 and Domain name2 replace the Domain name you wanted to create.

Example:

  • Domain name 1: pentaho1
  • Domain name 2: pentaho2
vi /etc/hosts
IP (IP of machine which hosts Nginx) Domain name1
IP (IP of machine which hosts Nginx) Domain name2

Communication between Nginx host and Pentaho host:

If the Nginx server and Pentaho server are in same machine, skip this step. Else perform the following steps.

  1. Open terminal of the machine which hosts your Pentaho 10.2 BA system. Open the host file in the system. Below is the command to open hosts file.
  2. In the IP replace your Host server IP and in Domain name1 and Domain name2 replace the Domain name you wanted to create.

Example:

  • Domain name 1: pentaho1
  • Domain name 2: pentaho2

Configuration changes Nginx:

  1. Locate the directory in which Nginx is saved in your system. Open the sites-available folder in Nginx through command line.
cd /etc/nginx/sites-available/
  1. After navigating into the sites-available folder, Now create the file reverse-proxy.conf if it does not exist. If exists, open the reverse-proxy.conf file and copy the mentioned code lines.
  2. To open reverse-proxy.conf file in command line,
vi reverse-proxy.conf
  1. Copy the below code to reverse-proxy.conf file.
server {
    listen 80;
    server_name pentaho1;

    location /pentaho/ {
        add_header 'Access-Control-Allow-Origin' '*';
        proxy_set_header include /etc/nginx/mime.types;
        proxy_set_header 'Access-Control-Max-Age' 1728000;
        proxy_set_header 'Access-Control-Allow-Origin' '*';
        proxy_set_header 'Access-Control-Allow-Credentials' 'true';
        proxy_set_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
        proxy_set_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
        proxy_set_header Host $http_host;
        proxy_pass http://IP:PORT/pentaho/;
    }
}

server {
    listen 80;
    server_name pentaho2;

    location /pentaho/ {
        add_header 'Access-Control-Allow-Origin' '*';
        proxy_set_header include /etc/nginx/mime.types;
        proxy_set_header 'Access-Control-Max-Age' 1728000;
        proxy_set_header 'Access-Control-Allow-Origin' '*';
        proxy_set_header 'Access-Control-Allow-Credentials' 'true';
        proxy_set_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
        proxy_set_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
        proxy_set_header Host $http_host;
        proxy_pass http://IP:PORT/pentaho/;
    }
}

Pentaho 10.2 Enhancement: For production environments, use HTTPS with SSL/TLS certificates. Pentaho 10.2 supports modern security protocols and certificate management.

  1. Change the pentaho1 to your 1st domain name and update proxy_pass:
proxy_pass http://IP:PORT/pentaho/;
  1. Change the pentaho2 to your 2nd domain name and update proxy_pass:
proxy_pass http://IP:PORT/pentaho/;
  1. Now to navigate through command line to sites-enabled folder.
cd /etc/nginx/sites-enabled/
  1. Now open the reverse-proxy.conf file in command line and check if the changes we made in the reverse-proxy.conf file under sites-available folder is automatically updated in the reverse-proxy.conf under sites-enabled folder.
  2. If the changes are not updated or if the reverse-proxy.conf file is not found under sites-enabled folder, then create a symbolic link for the configuration files.
  3. Below is the command to create a symbolic link between sites-available and sites-enabled.
sudo ln -s /etc/nginx/sites-available/reverse-proxy.conf /etc/nginx/sites-enabled/

Start Nginx server:

  1. If the Nginx server is not running, start the Nginx with the below command.
sudo service nginx start
  1. If the Nginx is running, restart the Nginx with the below command.
sudo service nginx restart
  1. Now after starting the Nginx, go to the browser and type each server name configured to nginx in each tab of the browser and /pentaho with it.

Modern Deployment Options with Pentaho 10.2

Option 1: Docker Container Deployment

Pentaho 10.2 supports Docker containers, providing a more modern and scalable deployment option. With Docker, you can deploy Pentaho 10.2 in containers and use Nginx as a reverse proxy for containerized instances.

Benefits:

  • Consistent deployments across environments
  • Easy scaling (spin up more containers as needed)
  • Simplified configuration management
  • Better isolation and security

Example Docker Compose Configuration:

version: '3.8'
services:
  pentaho1:
    image: pentaho/pentaho-server:10.2
    container_name: pentaho1
    ports:
      - "8080:8080"
    environment:
      - JAVA_OPTS=-Xmx2g
    networks:
      - pentaho-network

  pentaho2:
    image: pentaho/pentaho-server:10.2
    container_name: pentaho2
    ports:
      - "8081:8080"
    environment:
      - JAVA_OPTS=-Xmx2g
    networks:
      - pentaho-network

  nginx:
    image: nginx:latest
    container_name: nginx-proxy
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./nginx.conf:/etc/nginx/nginx.conf
      - ./ssl:/etc/nginx/ssl
    depends_on:
      - pentaho1
      - pentaho2
    networks:
      - pentaho-network

networks:
  pentaho-network:
    driver: bridge

Nginx Configuration for Docker:

upstream pentaho1 {
    server pentaho1:8080;
}

upstream pentaho2 {
    server pentaho2:8080;
}

server {
    listen 80;
    server_name pentaho1.example.com;

    location /pentaho/ {
        proxy_pass http://pentaho1/pentaho/;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

server {
    listen 80;
    server_name pentaho2.example.com;

    location /pentaho/ {
        proxy_pass http://pentaho2/pentaho/;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

Option 2: Kubernetes Deployment

Pentaho 10.2 supports Kubernetes orchestration, enabling auto-scaling, load balancing, and rolling updates. Nginx Ingress Controller can be used for routing.

Benefits:

  • Auto-scaling based on demand
  • Load balancing across multiple pods
  • Rolling updates without downtime
  • Health checks and self-healing
  • Service discovery

Example Kubernetes Configuration:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: pentaho-server
spec:
  replicas: 2
  selector:
    matchLabels:
      app: pentaho
  template:
    metadata:
      labels:
        app: pentaho
    spec:
      containers:
      - name: pentaho
        image: pentaho/pentaho-server:10.2
        ports:
        - containerPort: 8080
        env:
        - name: JAVA_OPTS
          value: "-Xmx2g"
---
apiVersion: v1
kind: Service
metadata:
  name: pentaho-service
spec:
  selector:
    app: pentaho
  ports:
  - port: 8080
    targetPort: 8080
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: pentaho-ingress
spec:
  rules:
  - host: pentaho1.example.com
    http:
      paths:
      - path: /pentaho
        pathType: Prefix
        backend:
          service:
            name: pentaho-service
            port:
              number: 8080
  - host: pentaho2.example.com
    http:
      paths:
      - path: /pentaho
        pathType: Prefix
        backend:
          service:
            name: pentaho-service
            port:
              number: 8080

Option 3: Cloud-Native Deployment

Pentaho 10.2 supports cloud-native deployment on AWS, Azure, and GCP. Use cloud load balancers (AWS ALB, Azure Application Gateway, GCP Load Balancer) instead of Nginx for cloud deployments.

Benefits:

  • Managed load balancing
  • Auto-scaling
  • SSL/TLS termination
  • DDoS protection
  • Global distribution

Key Benefits of Pentaho 10.2 Deployment Options

  1. Traditional Nginx + VM: Simple, familiar, full control
  2. Docker Containers: Consistent deployments, easy scaling, better isolation
  3. Kubernetes: Auto-scaling, load balancing, rolling updates, self-healing
  4. Cloud-Native: Managed services, global distribution, DDoS protection

Performance Considerations

Pentaho 10.2 Performance Improvements:

  • Java 17: 2-3x faster than Java 8/11
  • Improved Memory Management: Better resource utilization
  • Enhanced Caching: Intelligent query caching reduces load
  • Connection Pooling: Better database connection management

Nginx Optimization:

  • Enable gzip compression
  • Use HTTP/2 for better performance
  • Implement caching for static resources
  • Configure appropriate timeouts
  • Use SSL/TLS for secure connections

Security Best Practices

  1. Use HTTPS: Always use SSL/TLS certificates in production
  2. Firewall Rules: Restrict access to Pentaho servers
  3. Rate Limiting: Implement rate limiting in Nginx
  4. Security Headers: Add security headers in Nginx configuration
  5. Certificate Management: Use Let’s Encrypt or managed certificates

Frequently Asked Questions

How does Nginx reverse proxy work with Pentaho?

Nginx reverse proxy configuration enables multiple domain access to Pentaho 10.2 BA Server, providing flexible routing and load distribution. Nginx acts as an intermediary between clients and Pentaho servers, handling SSL termination, load balancing, and routing requests to appropriate Pentaho instances.

What are the benefits of Nginx configuration for Pentaho?

Key benefits include multiple domain support (access Pentaho through different domain names), flexible routing (route requests based on domain), load balancing (distribute traffic across multiple Pentaho servers), SSL termination (handle SSL/TLS at Nginx level), and improved performance (caching, compression, HTTP/2).

How to configure Nginx for multiple domains with Pentaho?

Configure Nginx for multiple domains by setting up server blocks for each domain, configuring upstream servers for Pentaho instances, setting up SSL/TLS certificates, configuring load balancing, and implementing security best practices (firewall rules, rate limiting, security headers).

Does Nginx configuration support load balancing?

Yes. Nginx configuration supports load balancing across multiple Pentaho servers using upstream blocks and load balancing algorithms (round-robin, least connections, IP hash). This distributes traffic evenly and improves performance and availability.

What security best practices should I follow with Nginx?

Security best practices include using HTTPS (SSL/TLS certificates), implementing firewall rules to restrict access, configuring rate limiting, adding security headers, using managed certificates (Let’s Encrypt), and following Nginx security configuration guidelines.

Can Nginx be used with Docker/Kubernetes deployments?

Yes. Nginx can be used with Docker and Kubernetes deployments. Nginx can run as a container alongside Pentaho containers, or as an Ingress controller in Kubernetes, providing flexible routing and load balancing for containerized Pentaho deployments.

What are alternatives to Nginx for Pentaho deployment?

Alternatives to Nginx include Apache HTTP Server, HAProxy, cloud load balancers (AWS ALB, Azure Load Balancer, GCP Load Balancer), and Kubernetes Ingress controllers. Pentaho 10.2 also supports Docker and Kubernetes deployments with built-in service discovery and load balancing.

🎯 Ready to configure Nginx for Pentaho?

Nginx reverse proxy configuration enables multiple domain access to Pentaho 10.2 BA Server with flexible routing and load distribution. Learn how to configure Nginx for optimal Pentaho deployment.

Contact TenthPlanet for expert Pentaho server configuration and Nginx setup services.

Note: Pentaho 10.2 provides multiple deployment options beyond traditional Nginx reverse proxy. Choose the deployment method that best fits your infrastructure, scalability needs, and operational requirements. Docker and Kubernetes deployments offer modern, scalable alternatives to traditional VM-based deployments.

Related Resources:


pentaho banner