Problem:
Nach dem Umzug eines Servers bekam ich folgende Fehlermeldung:
[error] [client ] Invalid method in request \x16\x03\x01
[error] [client ] Invalid method in request \x16\x03\x01
[error] [client ] Invalid method in request \x16\x03\x01
[error] [client ] Invalid method in request \x16\x03
Test SSL Port 443:
# telnet <IP-ADDRESS> 443
Trying <IP-ADDRESS>...
Connected to <IP-ADDRESS>.
Escape character is '^]'.
GET /
Lösung:
Bestehende Apache2 Konfiguration:
<VirtualHost <DNS-NAME>:443>
</VirtualHost>
Änderung in der Apache2 Konfiguration:
<VirtualHost *:443>
</VirtualHost>
Hintergrund:
Das SSL Zertifikat ist auf den DNS-NAME ausgestellt und der Apache2 matched zum VirtualHost auch die richtige IP-ADRESSE und nicht den DNS-NAME.
Anmerkung:
Andere Lösung kann auch die Deaktivierung der standard SSL-Konfiguration sein.
Eine kurze Anleitung, wie Apache2, PHP5 und MySQL5 auf UTF-8 unter Debian sicherstellt.
Apache2
Änderung in der Datei /etc/apache2/apache2.conf vornehmen:
AddDefaultCharset utf-8
bzw. kann man auch in Debian in der Datei /etc/apach2/conf.d/charset diese Änderung vornehmen
PHP
Änderung in der Datei /etc/php5/apache2/php.ini vornehmen:
[PHP]
default_charset = “utf-8?
[mbstring]
mbstring.language = utf-8
mbstring.internal_encoding = utf-8
mbstring.http_input = utf-8
mbstring.http_output = utf-8
MySQL
Änderungen in der Datei /etc/mysql/my.cnf vornehmen:
[client]
default-character-set = utf8
[mysqld]
default-character-set = utf8
character-set-server = utf8
collation-server= utf8_general_ci
init_connect = ‘SET collation_connection = utf8_general_ci’
init_connect = ‘SET NAMES utf8?
[mysqldump]
default-character-set = utf8
[mysqlimport]
default-character-set = utf8
[mysql]
default-character-set = utf8
Anmerkung:
Voraussetzung für die Umstellung ist die UTF8 Konvierung von Dateien und Datenbanken.
Linux Tool für die Konvertierung von Dateien ist z.B. iconv
Canonical Hostname Redirect (non-www to www):
This solution will redirect any page requested via a non-www domain to the same URL with the www domain, and as such it can be placed in the DocumentRoot of your site and will be enforced globally:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain\.com
RewriteRule (.*) http://www.domain.com/$1 [R=301,L]
Apache2 rewrite guide
Apache2 htaccess Tutorial