[ad_1]
Below are the Error log – (tail -f /usr/local/apache/logs/error_log | grep IP address )
[Wed Nov 2 19:55:14 2016] [error] ModSecurity: Access denied with code 403,
[Rule: ‘TX:0’ ‘[email protected] userdata_wl_content_type’]
2016-11-02 19:55:14.148 [NOTICE] [IP Address:54100:HTTP2-1] Content len: 1276, Request line:
‘PUT /ajax/api/static-pages/2 HTTP/1.1’
2016-11-02 19:55:14.148 [INFO] [IP Address49:54100:HTTP2-1] Cookie len: 36,
PHPSESSID=or0n7vj8be5vq5o61id69bgd45
2016-11-02 19:55:14.148 [NOTICE] [IP Address:54100:HTTP2-1] Redirect: #1,
URL: /index.php
2016-11-02 19:55:14.148 [INFO] [IP Address:54100:HTTP2-1] File not found
[/home/henrystb/public_html/403.shtml]
1. Find out the mod security rules which are triggered by checking apache error logs. You can also check the modsec audit logs.
Mod security audit log location – /usr/local/apache/logs/modsec_audit.log
You’ll need to do below server-wide changes –
cd /usr/local/apache
Put your Content-Type in whitelist here –
Below are some example header type for your reference –
application/x-www-form-urlencoded
multipart/form-data
text/xml
application/xml
application/x-amf
application/json
application/octet-stream
text/plain
json
Note:- You can usually use Chome/Firefox developer tools to get the HTTP header ( right click on page >> Inspect Element).
Let me know if you’ve any thoughts
[ad_2]