對於WordPress網站的服務器是否有任何標準(?!)mod_security2規則? 我想說清楚我不想禁用 mod_security2(它存在的原因很好)。在使用WordPress安裝時,我只想讓自己的生活更輕鬆一些。WordPress的mod_security2規則
我已閱讀本http://wpsecure.net/2012/01/using-mod_security-2-with-wordpress/但它已經在使用mod_security2 & WordPress的是巨大的,聽到的人更多的意見。
因爲我沒有這方面的專家,有沒有什麼文檔上究竟有以下幾種讀...
<LocationMatch "/wp-admin/post.php">
SecRuleRemoveById 300015 300016 300017 950907 950005 950006 960008 960011 960904 959006
SecRuleRemoveById phpids-17
SecRuleRemoveById phpids-20
SecRuleRemoveById phpids-21
SecRuleRemoveById phpids-30
SecRuleRemoveById phpids-61
</LocationMatch>
<LocationMatch "/wp-admin/admin-ajax.php">
SecRuleRemoveById 300015 300016 300017 950907 950005 950006 960008 960011 960904 959006
SecRuleRemoveById phpids-17
SecRuleRemoveById phpids-20
SecRuleRemoveById phpids-21
SecRuleRemoveById phpids-30
SecRuleRemoveById phpids-61
</LocationMatch>
<LocationMatch "/wp-admin/page.php">
SecRuleRemoveById 300015 300016 300017 950907 950005 950006 960008 960011 960904
SecRuleRemoveById phpids-17
SecRuleRemoveById phpids-20
SecRuleRemoveById phpids-21
SecRuleRemoveById phpids-30
SecRuleRemoveById phpids-61
</LocationMatch>
<LocationMatch "/wp-admin/options.php">
SecRuleRemoveById 300015 300016 300017 950907 950005 950006 960008 960011 960904 959006
SecRuleRemoveById phpids-17
SecRuleRemoveById phpids-20
SecRuleRemoveById phpids-21
SecRuleRemoveById phpids-30
SecRuleRemoveById phpids-61
</LocationMatch>
<LocationMatch "/wp-admin/theme-editor.php">
SecRuleRemoveById 300015 300016 300017 950907 950005 950006 960008 960011 960904 959006
SecRuleRemoveById phpids-17
SecRuleRemoveById phpids-20
SecRuleRemoveById phpids-21
SecRuleRemoveById phpids-30
SecRuleRemoveById phpids-61
</LocationMatch>
<LocationMatch "/wp-content/plugins/">
SecRuleRemoveById 300015 340151 1234234 340153 1234234 300016 300017 950907 950005 950006 960008 960011 960904 959006
SecRuleRemoveById phpids-17
SecRuleRemoveById phpids-20
SecRuleRemoveById phpids-21
SecRuleRemoveById phpids-30
SecRuleRemoveById phpids-61
</LocationMatch>
<LocationMatch "/wp-includes/">
SecRuleRemoveById 960010 960012 950006 959006
SecRuleRemoveById phpids-17
SecRuleRemoveById phpids-20
SecRuleRemoveById phpids-21
SecRuleRemoveById phpids-30
SecRuleRemoveById phpids-61
</LocationMatch>
<LocationMatch "/wp-content/themes/">
SecRuleRemoveById 340151 340153 1234234 950006 959006
SecRuleRemoveById phpids-17
SecRuleRemoveById phpids-20
SecRuleRemoveById phpids-21
SecRuleRemoveById phpids-30
SecRuleRemoveById phpids-61
</LocationMatch>
<LocationMatch "/wp-cron.php">
SecRuleRemoveById 960015
</LocationMatch>
<LocationMatch "/feed">
SecRuleRemoveById 960015
</LocationMatch>
<LocationMatch "/category/feed">
SecRuleRemoveById 960015
</LocationMatch>
謝謝。
感謝您分享您的體驗。所以......如果我知道它是正確的,你所建議的是通過閱讀(mod_security)日誌來嘗試和捕捉。 – kanenas
是的,使用規則集(例如OWASP)設置mod_security2並配置mod_security2,因此它只使用設置「SecRuleEngine DetectionOnly」設置記錄到審計日誌。然後在前端和後端使用Wordpress網站,並檢查審覈日誌以查看哪些規則會產生誤報。有了這個結果,您可以使用SecRuleRemoveById來創建自己的排除規則,如文章中所示。 – derhansen