Setup Web Client Installation in SAP Web with Nginx Proxy

Maen Mustafa

Dear All,

The official BEAS documentation provides a full guide on setting up BEAS Web with SAP Web Client using XAMPP. However, some users prefer not to use XAMPP and may want to use a lighter proxy application like NGINX. I recently successfully set up BEAS Web using NGINX on Windows. The following steps will help you complete the setup.

  1. Download the latest NGINX version from the official website:
    https://nginx.org/en/docs/windows.html

  2. Optionally, you can install NGINX as a Windows service using NSSM, or use your preferred method to run it as a service. Alternatively, you can run it as a normal application.

  3. Generate a secure certificate following the BEAS guide:
    https://help.beascloud.com/beas202511/certificate-generation-for-sec.htm

After generating the certificate, take the cert.crt and cert.key files and place them in the NGINX configuration folder. In my example, the path is C:\nginx\conf, but you can use any folder as long as it is accessible to NGINX and the path is correctly defined in nginx.conf.

  1. Open nginx.conf and paste the following code. Modify any paths or IP addresses if they are different from your environment (in my case, BEAS and NGINX are on the same server):

 worker_processes  1;

events {
    worker_connections 1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;

    sendfile on;
    keepalive_timeout 65;

  
    server {
        listen 4430 ssl;
        server_name 192.168.90.66;

        ssl_certificate      "C:/nginx/conf/cert.crt";
        ssl_certificate_key  "C:/nginx/conf/cert.key";

        ssl_protocols TLSv1.2 TLSv1.3;
        ssl_ciphers HIGH:!aNULL:!MD5;

        # proxy settings.
        
        location /beasweb/ {
            proxy_pass http://192.168.90.66:8084/beasweb/;

            proxy_http_version 1.1;

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

            # BEAS session cookies fix
            proxy_cookie_path /beasweb/ /;

            proxy_redirect off;

            # SAP / BEAS timeouts - basic nginx config
            proxy_connect_timeout 60;
            proxy_send_timeout    300;
            proxy_read_timeout    300;
        }

    #  BEAS ODATA / it is very important to redirect the connection to service layer.
    location /odata4/ {
        proxy_pass http://192.168.90.66:8084/odata4/;

        proxy_http_version 1.1;
        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 https;

        proxy_read_timeout 300;
    }

    
       # root redirection.
        location = / {
            return 301 /beasweb/terminal20?program_id=terminal20&page=main;
        }
    }

 
    server {
        listen 8000;
        server_name 192.168.90.66;

        return 301 https://192.168.90.66:4430$request_uri;
    }
}

After saving the file, restart NGINX either by running nginx -s reload or by restarting the service if you installed it as a Windows service.

Next, open BeasManufacturingWebClientTiles.mtar from the shared folder:

 

{
  "tiles": [
    {
      "text": "BEAS Terminal",
      "enableTitleHeader": true,
      "subtitle": "BEAS Manufacturing",
      "url": "https://192.168.90.66:4430/beasweb/terminal20?program_id=terminal20&page=main",
      "linkmethod": "NewWindow",
      "size": "1x1",
      "icon": "sap-icon://desktop-mobile",
      "image": ""
    }, {
      "text": "Inventory History",
      "enableTitleHeader": true,
      "subtitle": "BEAS Manufacturing",
      "url": "https://192.168.90.66:4430/beasweb/terminal20?program_id=terminal20&page=t20_iteminvinfo",
      "linkmethod": "ExistingWindow",
      "size": "1x1",
      "icon": "sap-icon://BusinessSuiteInAppSymbols/icon-stock-warehouse",
      "image": ""
    }, {
      "text": "Production Cockpit",
      "enableTitleHeader": true,
      "subtitle": "BEAS Manufacturing",
      "url": "https://192.168.90.66:4430/beasweb/terminal20?program_id=terminal20&page=main",
      "linkmethod": "NewWindow",
      "size": "1x1",
      "icon": "sap-icon://bbyd-dashboard",
      "image": ""
    }
  ]
}

 

 

Finally, import the modified file into **Extension Manager**, activate it, and you are ready to use BEAS Web with NGINX. If you have any questions, feel free to contact me.

 

Regards,

Maen AbuTabanjeh

SAP & HANA Technical Consultant @ AN Group

Comments

1 comment

  • Comment author
    Maen Mustafa

    Just modify i fixed the problem with nginx on to allow open tile on the same window .. this is the new config :

     worker_processes  1;
     
    events {
        worker_connections 1024;
    }
     
    http {
        include       mime.types;
        default_type  application/octet-stream;
     
        sendfile on;
        keepalive_timeout 65;
     
      
        server {
            listen 4430 ssl;
            server_name 192.168.90.66;
     
            ssl_certificate      "C:/nginx/conf/cert.crt";
            ssl_certificate_key  "C:/nginx/conf/cert.key";
     
            ssl_protocols TLSv1.2 TLSv1.3;
            ssl_ciphers HIGH:!aNULL:!MD5;
     
            # -------------------------------
            # MAIN BEAS PROXY
            # -------------------------------
     
      location /beasweb/ {
            proxy_pass http://192.168.90.66:8084; # Simplified pass
     
            proxy_http_version 1.1;
            proxy_set_header Host $host:$server_port;
            proxy_set_header X-Forwarded-Proto https;
            proxy_set_header X-Forwarded-Port 4430;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header Authorization $http_authorization;
     
            # Fix for Authentication Cookies in iFrames
            proxy_cookie_path / "/; HTTPOnly; Secure; SameSite=None";
     
            # Fix for Cross-Origin (WebClient to Beas) to allow open on the same window ..
     
            add_header 'Access-Control-Allow-Origin' 'https://192.168.90.62' always;
            add_header 'Access-Control-Allow-Credentials' 'true' always;
     
            proxy_redirect off;
            proxy_connect_timeout 60;
            proxy_send_timeout    300;
            proxy_read_timeout    300;
        }
     
     
     
    # BEAS assets (icons, app definitions)
    location /beasweb/assets21/ {
     
        proxy_set_header Host              $host:$server_port;
        proxy_set_header X-Forwarded-Proto https;
    }
     
        # ---- BEAS ODATA ----
       location /odata4/ {
            proxy_pass http://192.168.90.66:8084/odata4/;
            proxy_http_version 1.1;
            proxy_set_header Host $host:$server_port;
            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 https;
            proxy_read_timeout 300;
        }
        
            # -------------------------------
            # ROOT REDIRECT
            # -------------------------------
        location = / {
     }
     
        }
     
        # ===============================
        # OPTIONAL: HTTP → HTTPS REDIRECT
        # ===============================
        server {
            listen 8000;
            server_name 192.168.90.66;
     
        }
    }
     
     
    0

Please sign in to leave a comment.