Question

I would like to convert an existing apache ProxyPass rule to nginx but am unsure how to configure timeout etc...

My apache rule looks like

ProxyPass /ProcessRequest http://127.0.0.1:8080/MyApp/ProcessRequest timeout=180 KeepAlive=On

My nginx config is as below. I created a new location ProcessRequest but dont know how to confugre the equivalent to timeout=180 KeepAlive=On

server {
        #listen   80; ## listen for ipv4; this line is default and implied
        #listen   [::]:80 default_server ipv6only=on; ## listen for ipv6

        #root /usr/share/nginx/www/uidemo;
        root /usr/share/nginx/www;
        #root /usr/share/nginx/html
        index index.html index.htm index.php;

        # Make site accessible from http://localhost/
        server_name localhost;

        location / {

                # First attempt to serve request as file, then
                # as directory, then fall back to displaying a 404.
                try_files $uri $uri/ /index.html;
                # Uncomment to enable naxsi on this location
                # include /etc/nginx/naxsi.rules

        }

        location /ProcessRequest {

                proxy_pass http://127.0.0.1:8080/MyApp/ProcessRequest;


        }

--- 
---

No correct solution

OTHER TIPS

Answer is:

location /ProcessRequest {
        proxy_buffering off;
        proxy_connect_timeout 180;
        proxy_send_timeout 180;
        proxy_read_timeout 180;
        proxy_buffers 8 32k;


        proxy_pass http://127.0.0.1:8080/MyApp/ProcessRequest;
    }
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top