Where to add additional GEO directives to Ngnix, like this ?:
geo $trusted_user {
default 0;
1.1.1.0/24 1;
2.2.2.0/24 1;
}
server
{
if ( $trusted_user ~ 0 ) {rewrite ^ https://example.com; }
}
In Domains > example.com > Apache & nginx Settings this is not possible.
I got error: GEO directive not allowed here.
I need to add these directives only for one domain, and so that after the Plesk update they are not lost.
geo $trusted_user {
default 0;
1.1.1.0/24 1;
2.2.2.0/24 1;
}
server
{
if ( $trusted_user ~ 0 ) {rewrite ^ https://example.com; }
}
In Domains > example.com > Apache & nginx Settings this is not possible.
I got error: GEO directive not allowed here.
I need to add these directives only for one domain, and so that after the Plesk update they are not lost.
Last edited: