Notification texts go here Contact Us Buy Now!

Return 503 for POST request in Nginx

**HTTP 503 POST Request Return in Nginx** **Issue:** A 503 Service Unavailable error is returned when sending a POST request to Nginx. **Solutions:** **Solution 1: Force 405 Requests to Actual URI** ``` error_page 405 = $uri; ``` **Solution 2: Capture 405 Errors in Maintenance Page** ``` recursive_error_pages on; if (-f $document_root/system/maintenance.html) { return 503; } error_page 404 /404.html; error_page 500 502 504 /500.html; error_page 503 @503; location @503 { error_page 405 = /system/maintenance.html; if (-f $request_filename) { break; } rewrite ^(.*)$ /system/maintenance.html break; } ``` **Solution 3: Use Internal Location for 503 Errors** ``` error_page 503 /503; location /503 { internal; root /path/to/config; try_files /503.json =404; } ```

Post a Comment

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.