HTTP Strict Transport Security (HSTS) is an opt-in security enhancement that is specified by a web application through the use of a special response header. Once a supported browser receives this header that browser will prevent any communications from being sent over HTTP to the specified domain and will instead send all communications over HTTPS. It also prevents HTTPS click through prompts on browsers.
How to achieve apache with a bullet proof SSL config and HTTP Strict Transport Security (HSTS) with long duration
Here is goes
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=15553000; includeSubDomains"
</IfModule>
SSLUseStapling on
SSLSessionCache shmcb:/opt/apache2/logs/ssl_gcache_data(512000)
SSLStaplingCache shmcb:/opt/apache2/logs/ssl_stapling_data(512000)
SSLOptions +StrictRequire +StdEnvVars -ExportCertData
SSLProtocol -all +TLSv1 +TLSv1.1 +TLSv1.2
SSLCompression Off
SSLHonorCipherOrder On
SSLCipherSuite ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:!LOW:!MD5:!aNULL:!eNULL:!3DES:!EXP:!PSK:!SRP:!DSS
Since the spam increased that much up to 10k spam each week I searched for a solution. It came out that the combination of Akismet and Stop Spammer Registrations Plugin made it possible to have only 1 or 2 spam comments in the queue. I love it!
Well since the last years the spam comments in this blog have increased.
2009 114
2010 970
2011 3013
2012 4537
2013 12916 and this year is not over yet. US gouverment talked about they took down some large bot nets. I’m not sure they were that successful as they say. How many bot nets might be in public cloud like ämäzön or so? It is hard to guess, but the massive flood of spam comments and even larger flood of spam email has increased. Also the scum mail in Real Life (TM) has increased. D’oh!
Es tut uns leid, Ihr Passwort muss mindestens einen Großbuchstaben, zwei Ziffern, ein Symbol, eine inspirierende Nachricht, einen Zauberspruch, ein Gang-Logo, eine Hieroglyphe und das Blut einer Jungfrau enthalten.
If you an exception handler even that seems fail (in itself) with __toString() must not throw an exception. There is no nice safe way to handle it. The easiest solution is to catch that error as well. It might seems to be odd, but on the other hand the exception hanler shall not fail ;)
/**
* String representation of this object
* @return string
*/
public function __toString()
{
try {
return (string) $this->name;
} catch (Exception $exception) {
return '';
}
}