serving certain file for all but one server{}

ST smntov at
Sun Jul 30 11:09:11 UTC 2017


I have a lot of server{}s with different server_names all over my setup.
I want to serve robots_closed.txt instead of robot.txt for all but one
domain. And for that one domain, let's say, I want robot.txt
to served normally. What is the right way to achieve that without
writing an explicit redirect in all the server{}s? 

Thank you!

More information about the nginx mailing list