on apache I can easily add htaccess rule to deny or all wp login for particular IPs. In nginx how to do? I tried Rewrite rule converter:Apache to Nginx but it does not give any out put for below htaccess code:

<Files wp-login.php>
Order Deny,Allow
Deny from all
Allow from 11.11.11.11
</Files>

    sirfpsycho Hello, try the following format restrictions.

    Among them, the allow part can be limited to the IP that can access the landing page. After modification, reload nginx again.

    location = /wp-login.php
        {
          fastcgi_pass  127.0.0.1:9000;
          fastcgi_index index.php;
          include fcgi.conf;
    
          allow 192.168.9.0/24;
          deny all;    
        }
      7 days later

      aapanel_power
      I tried this:
      location ^~ /wp-login.php {
      allow ip; 5.5.5.5
      deny all;
      }
      here 5.5.5.5 has my own IP, I can not expose.
      it gives this error:
      ERROR:
      nginx: [emerg] invalid parameter "ip" in /www/server/panel/vhost/rewrite/domain.com.conf:23
      nginx: configuration file /www/server/nginx/conf/nginx.conf test failed

        Connect with us: 📨 Telegram 💬 Discord Email: support@aapanel.com