gesprächige Webserver
Heute schreibe ich mal etwas über die Standardeinstellungen eines Apache2 Webservers.Der normale Antwort-Header eines Apache2 Webservers sieht ungefähr so aus:
Code
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
Date: Wed, 04 Mar 2009 13:45:46 GMT
Server: Apache/2.2.3 (Debian) PHP/5.2.6-1+lenny2 mod_ssl/2.2.3 OpenSSL/0.9.8c
X-Powered-By: PHP/5.2.6-1+lenny2
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Encoding: gzip
Vary: Accept-Encoding
Content-Length: 5573
Content-Type: text/html; charset=UTF-8
200 OKAls erstes ändern wir in der Datei /etc/php5/apache2/php.ini
Code
1
2
3
2
3
expose=on
// in
expose=offCode
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
Date: Wed, 04 Mar 2009 13:46:43 GMT
Server: Apache/2.2.3 (Debian) PHP/5.2.6-1+lenny2 mod_ssl/2.2.3 OpenSSL/0.9.8c
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Encoding: gzip
Vary: Accept-Encoding
Content-Length: 5573
Content-Type: text/html; charset=UTF-8
200 OKCode
1
2
3
4
5
6
7
2
3
4
5
6
7
ServerTokens Full
ServerSignature On
TraceEnable On
// nach
ServerTokens Prod
ServerSignature Off
TraceEnable OffCode
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
Date: Wed, 04 Mar 2009 13:46:43 GMT
Server: Apache
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Encoding: gzip
Vary: Accept-Encoding
Content-Length: 5573
Content-Type: text/html; charset=UTF-8
200 OK