Welcome! Log In Create A New Profile


limit_req_zone & proxy_intercept_errors

All files from this thread

File Name File Size   Posted by Date  
20181227212647.zip 42.6 KB open | download 桐山 健太郎 12/27/2018 Read message
桐山 健太郎
December 27, 2018 07:28AM

I’m using the nginx as a reverse proxy server.

The components are formatted like the attached.
>Layout sheet on the attached file is showing the layout of the system. *Platform is AWS.
>nginx.conf is showing the conf. file on /etc/nginx/ on nginx server.
>ALB.conf is showing the conf. file on /etc/nginx/conf.d/

The proxy passing target is the DNS name of Application Load Balancer(AWS)

Here are the details that I would like to achieve.

1. Limiting the request to the backend apache server on nginx server.
The client will request to the below URL. “URL is just a sample”

By looking at the developer tools on google chrome the web site is formatted with other requests with multiple .css , .js , .png, .ico file extension requests.

On nginx.conf in the attached file, I have used the “limit_req_zone” and would like to limit the request to pass though 13r/s to the backend apache server.
Then tried with and attached conf. file, but didn’t work well that the limit is counting the requests with and file extension which I’ve mentioned above.

2. When the backend apache server respond with an 500 code, I would like to replace the status code to 200 and respond it back to the client(Requester).

The reason why I would like to do this is that the CloudFront very front on this web system has the custom error pages response.
If the backend apache server returns the 500 response with and message like “authentication error” and without replacing the status code on nginx, the client(Requester) will get an error pages from the desired error page on S3 bucket by the rule of CloudFront custom error page.

For No.1, Can anyone define how to exclude the requests with an following file extension when the client access to the Web page.

For No 2, As I’m selecting the proxy_intercept_errors, does the conf. which I’ve wrote in the attached file works?

nginx mailing list
open | download - 20181227212647.zip (42.6 KB)
Subject Author Posted

limit_req_zone & proxy_intercept_errors Attachments

桐山 健太郎 December 27, 2018 07:28AM

RE: limit_req_zone & proxy_intercept_errors

桐山 健太郎 December 27, 2018 07:30AM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 107
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready