Skip to main content

Setup Web Client Installation in SAP Web with Nginx Proxy

Comments

1 comment

  • 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;
     
        }
    }
     
     

Please sign in to leave a comment.