Thank you.
My configurations were:
1.
root /path_to_root1;
if ($remote_addr = xx.xx.xx.xx) {
set $document_root /path_to root2;
}
2.
map $remote_addr $document_root {
default /path_to_root1;
xx.xx.xx.xx /path_to root2;
}
3.
geo $document_root {
default /path_to_root1;
xx.xx.xx.xx /path_to_root2;
}
I tryed the three ways you suggested but nginx always answered:
nginx: [emerg] the duplicate "document_root" variable.
My configuration would be to have one document_root for a specific IP and another for the rest of the world.
Did i make any mistake in my configuration?
thank you