I have a multi-server architecture i.e Server a and server b, Now I want all the URL's hit containg a perticuler keyword should always go to server a, So I added a nginx rule (if url have keyword redirect to server a)
Now every thing is working fine but file upload is returning error code 501, But the issue resolves if I make an entry for server a IP in my /etc/hosts.
Using Angular and php
Ok So finally I found the issue. It was happening because of the options request.
Options is a special kind of request which is used when the client wants to determine other available methods to retrieve or process a document on the Web server.
So in my case my web server a and b have options method implemented while the server c (which is acting as a load balancer) does not resulting in 501 not implemented error