Skip to main content

Posts

Showing posts with the label Nginx

Stop nginx decoding query paramaters on proxy pass

When using nginx in front of several applications, In coming requests come to the nginx as encoded parameters but it reached to the backend application as decoded parameters. Because of that backend application rejects the massage since it accept encoded parameter. In order to solve this problem, with the following configuration we can stop decoding query parameters at the nginx level. location /t/ {                 proxy_set_header X-Real-IP $remote_addr;                  ------                  ------ #               proxy_next_upstream error timeout invalid_header http_500;                  proxy_pass https://amalkaorg.app1.wso2apps.com$ request_uri ;         } The parameter added as $request uri is the full original request URI (with a...

Fronting WSO2 AS worker/manager cluster with Nginx

This Blog describes how to configure Nginx as a load balancer with WSO2 Application Server cluster Nginx 1.4.1 WSO2 Application Server 5.2.1 Setup WSO2 AS Cluster This cluster consist of 3 WSO2 Application Server instances, as 3 worker nodes and 1 manager node, where 1 node work as both worker and manager. Nginx performs load balancing with this cluster by distributing incoming requests to the worker nodes via HTTP/S on port 80/443. All admin requests can be sent to the manager node directly via HTTPs on port 9444 or through the Nginx via 443 port depending on how we configure the manager node. Click   here  to see how to setup WSO2 Application Server cluster Setup Nginx load balancer * Install Nginx $sudo apt-get install nginx * Locate the http{} block of the /etc/nginx/nginx.conf file and add the following # load balancing among the worker nodes - HTTP upstream wso2.as.com {          ...