Is there any way to produce same Nginx 444 error in apache.
Nginx
444--> Connection Closed Without Response.
I like this error since if anyone tries to CURL he gets an empty response, but not so in Apache.
Is there any way to produce same Nginx 444 error in apache.
Nginx
444--> Connection Closed Without Response.
I like this error since if anyone tries to CURL he gets an empty response, but not so in Apache.
444 is not returned to the client, it is only written into nginx logs signalling that a connection was closed with no response. This same firewall-like behavior can be achieved in apache using modsecurity and DROP actions.
In case this helps...
I use Apache as a reverse proxy for a web app on port 3000, and I wanted to simply drop certain bogus requests with extreme prejudice — e.g., it's not WordPress, so I don't even want to dignify /wp-admin
probes with a response!
Anyway, I installed mod_security
as suggested, and added the following /etc/httpd/modsecurity.d/10-empty-response.conf
entry; now my app can return a "444" status, and the proxy will drop the connection:
SecRule RESPONSE_STATUS 444 "id:'444444',phase:3,log,drop"
Custom, non-standard HTTP response codes such as 444 do not seem to be supported by Apache. I could not find an exhaustive list of allowed codes in Apache's documentation for the ErrorDocument directive, however testing with something like
<Location /444>
ErrorDocument 444 "Something"
</Location>
Doesn't even allow Apache to load, whereas changing the 444
above to 404
allows Apache to load without any errors or problems.