Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
litespeed_wiki:config:wordpress-protection [2019/02/14 18:55] Jackson Zhang [Set "Trusted <ip>" in .htaccess to bypass the block] |
litespeed_wiki:config:wordpress-protection [2019/11/12 19:27] qtwrk |
||
---|---|---|---|
Line 102: | Line 102: | ||
|5|10|not set|10| | |5|10|not set|10| | ||
|5|10|20|10| | |5|10|20|10| | ||
+ | |||
+ | ===== How to Enable LSWS WordPressProtect Feature on Plesk ===== | ||
+ | |||
+ | Everything should be same as cPanel , only some difference on where to place the directives: | ||
+ | |||
+ | Server-Level configuration: | ||
+ | |||
+ | edit file `/usr/local/psa/admin/conf/templates/custom/domain/domainVirtualHost.php` | ||
+ | |||
+ | There are **two** block of following code: | ||
+ | |||
+ | <code><IfModule Litespeed> | ||
+ | CacheRoot lscache | ||
+ | </IfModule></code> | ||
+ | |||
+ | We can insert the code here , make it like: | ||
+ | |||
+ | <code><IfModule Litespeed> | ||
+ | CacheRoot lscache | ||
+ | WordPressProtect throttle, 5 | ||
+ | </IfModule></code> | ||
+ | |||
+ | This will override the default server-level setting from 10 to 5, then run ''/usr/local/psa/admin/sbin/httpdmng --reconfigure-all'' to regenerate the configuration file , then ''/usr/local/lsws/bin/lswsctrl restart'' to restart LSWS to take effect. | ||
+ | |||
+ | Vhost-level setting: | ||
+ | |||
+ | In Plesk domain page , as screenshot , go to ''Apache & nginx Settings'' , add directive in ''Additional directives for HTTP'' and ''Additional directives for HTTPS'' then click on **OK** or **Apply** to save it. | ||
+ | |||
+ | <code><IfModule Litespeed> | ||
+ | WordPressProtect throttle, 5 | ||
+ | </IfModule></code> | ||
+ | |||
+ | Plesk user can also use `.htaccess` to override the server-level setting as above example. | ||
+ | |||
===== Real Testing===== | ===== Real Testing===== | ||
Line 208: | Line 242: | ||
The explanation: WP protection blocking is only removed if the IP stops access attempts for a full 10 minutes. If the visitor constantly hits the server, the blocking won't be lifted. Restarting the web server will remove all IP blocks immediately. | The explanation: WP protection blocking is only removed if the IP stops access attempts for a full 10 minutes. If the visitor constantly hits the server, the blocking won't be lifted. Restarting the web server will remove all IP blocks immediately. | ||
+ | The bot-detection ''bot detected'' or ''WordPressBruteForce'' only log when a ''drop'' action is set. There won't be log entries for the ''deny'' and ''throttle'' actions. It is designed this way because ''drop'' is a more serious action, which blocks further requests from that IP (treated as unwanted botnet) and the log is for robot detection. | ||
+ | |||
+ | 2018-11-06 15:41:30.862784 [NOTICE] [24.96.xxx.xxx] bot detected for vhost [APVH_kevinandamanda.com], reason: WordPressBruteForce, close connection! | ||
+ | | ||
+ | Bot detection is one-time logging, while ''deny'' and ''throttle'' are per request, and it could become annoying with many repeated log messages. |