1, Apache httpd 的设定方法
举例来说,只允许 IP 地址「192.168.2.1」访问,按照如下设定,写入 Apache 的配置文件「httpd.conf」或者网站根目录下的「.htaccess」都可以。
<Files "wp-login.php">
Order Deny,Allow
Deny from all
Allow from 192.168.2.1
</Files>
只允许某 IP 地址段「192.168.2.*」访问,则为:
<Files "wp-login.php">
Order Deny,Allow
Deny from all
Allow from 192.168.2
</Files>
允许多个 IP 地址「192.168.2.1」「192.168.2.2」访问,则为:
<Files "wp-login.php">
Order Deny,Allow
Deny from all
Allow from 192.168.2.1 192.168.2.2
</Files>
2,没有固定 IP 的对应方法
如果你已经有了 VPS,挂上 socks5 代理。