-1

Is there a simple way how I could redirect a visitor (via .htaccess or PHP script) to a static page when the server is overloaded from too many requests?

It doesn't have to be a protection against huge amounts of requests at once or protect against DoS Attacks. I think our server would be protected enough if we could prevent the standard website to be shown and instead show a single file "overloaded.html".

Also how could I get a measure for a server being overloaded on a typical managed server (= non root access to a Linux server) environment?

i-CONICA
  • 648
  • 1
  • 9
  • 22
Tyron
  • 101
  • 2

1 Answers1

2

There is mod_limitipconn.

This tool simply rates limits requests and sends an error if the limit is hit. The limits are on a per-IP basis.

To rate-limit on other metrics, such as restrict a certain page or application, consider looking at mod_qos.

mod_qos can rate limit on many different variables and send a conditional response.

Both of these tools require root access. Perhaps your web-host could install it for you if you have a dedicated serer.

If you are on shared hosting without Apache access, you may have to build rate limiting into your scripts.

References

Mod QOS Documentation

Mod Limit iP Conn

jeffatrackaid
  • 4,142
  • 19
  • 22