Welcome! Log In Create A New Profile

Advanced

Re: serving certain file for all but one server{}

July 30, 2017 07:36AM
Hi!

You can rewrite the uri in the special server {} by the “rewrite” directive.


On 30 July 2017 at 19:09:27, ST (smntov@gmail.com) wrote:

Hello,

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 example.org, 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!

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

serving certain file for all but one server{}

ST July 30, 2017 07:10AM

Re: serving certain file for all but one server{}

tokers July 30, 2017 07:36AM

Re: serving certain file for all but one server{}

ST July 30, 2017 07:50AM

Re: serving certain file for all but one server{}

Francis Daly July 30, 2017 02:28PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 155
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready