Where is server{..} block?

Noob alert! I’m following tutorial here: https://easyengine.io/tutorials/nginx/block-wp-login-php-bruteforce-attack/

and it says to add this to server block:

location = /wp-login.php {
    limit_req   zone=one  burst=1 nodelay;
    include fastcgi_params;

so i add this to the where i think the server block is and when i restart nginx i get a fail. so i try other places in /etc/nginx/nginx.conf and i keep getting a fail?

the only server block i see in /etc/nginx/nginx.conf are these:

#	server {
#		listen     localhost:110;
#		protocol   pop3;
#		proxy      on;
#	}
#	server {
#		listen     localhost:143;
#		protocol   imap;
#		proxy      on;
#	}

i need help, i’m completely stuck on this part. edit: I should also mention, when i remove the line of code i added to nginx.conf it restarts “ok”.

It is in /etc/nginx/sites-available/domain.com.

I’d rather edit the vhost file with:

ee site edit domain.com

That’s because EE itself correctly reloads Nginx after editing the file, exempting us from nginx -t && service nginx reload.


That works, thanks so much!