Hi all,
We are running Nginx as a proxy in front of a multi-tenant app hosted on IIS. When one of the tenants is down for maintenance I would like to redirect the url to a static web page hosted on AWS S3 or a local static page on the Nginx server.
For example the url may be http://demo.myapp.com, so would want demo to be redirected but anything else such as http://test.myapp.com to function as normal through the proxy pass to the back end web servers.
I have tried using rewrite / return in a new server block setting the server name to demo.myapp.com and this works redirecting to a static page but it redirects all not just demo.
All the traffic goes to port 80 on the Nginx server and the default location / then proxy to the back end web servers.
Looking for any advice on this as I am new to Nginx and cannot find an answer.
Thanks in advance.