• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

Issue Where to add additional GEO directives to Ngnix

Mnu555

New Pleskian
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.
 
Last edited:
Back
Top