Same root folder for multiple website different robots.txt

Vincent M. mouseless at free.fr
Fri Aug 6 14:20:56 UTC 2021


Hello,

I have a first website with this configuration:

server {
         server_name mywebsite.com;

         root /var/www/website/prod;
...
}

and a second one like this with the same root folder:

server {
         server_name pro.mywebsite.com;

         root /var/www/website/prod;
...
}

And the only problem is they have the same robots.txt file.

Is it possible to tell the second server to link the file robots.txt to 
another file like robots-pro.txt?

And by the way the url http://pro.mywebsite.com/robots.txt would open 
the file robots-pro.txt.

Thanks,
Vincent.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20210806/3b42dbbb/attachment.htm>


More information about the nginx mailing list