Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen gezeigt.

Link zu dieser Vergleichsansicht

tux:disable_apache_signature [2013/04/13 11:27]
wikisysop angelegt
tux:disable_apache_signature [2013/04/13 18:31] (aktuell)
wikisysop
Zeile 1: Zeile 1:
-=====Apache:​ Serversignatur deaktivieren===== +[[:tux|{{ :​linux.png?​40|}}]] 
-Der Apache Webserver bietet in seiner Standardeinstellung ​etliche ​Informationen über die verwendete Version ​und des zugrunde liegendem Betriebssystems an:+=====Apache/PHP: Serversignatur deaktivieren===== 
 +Der Apache Webserver bietet in seiner Standardeinstellung Informationen über die verwendeten Versionen (Apache und PHP) und des zugrunde liegendem Betriebssystems an:
  
 <​xterm>​$ <fc #​008000>​wget --save-headers -O- -q http://​wiki.prontosystems.org</​fc>​ <​xterm>​$ <fc #​008000>​wget --save-headers -O- -q http://​wiki.prontosystems.org</​fc>​
Zeile 6: Zeile 7:
 Date: Sat, 13 Apr 2013 09:11:25 GMT Date: Sat, 13 Apr 2013 09:11:25 GMT
 <fc #​800000>​Server:​ Apache/​2.2.16 (Debian)</​fc>​ <fc #​800000>​Server:​ Apache/​2.2.16 (Debian)</​fc>​
-X-Powered-By:​ PHP/​5.3.3-7</​xterm>​+<fc #800000>X-Powered-By:​ PHP/5.3.3-7</fc></​xterm>​ 
 + 
 +Aus Sicherheitsgründen sollte man diese Information abschalten, weil dadurch ein potentieller Angreifer die der Version zugrunde liegenden Sicherheitslöcher leichter ermitteln kann. In der >><​fc #​008000>​Apache</​fc><<​ Webserver Konfiguration sind dafür zwei Parameter vorhanden, welche die bereitgestellten Informationen beeinflussen:​ 
 + 
 +  * **''​ServerTokens''​** 
 +  * **''​ServerSignature''​** 
 + 
 +Diese befinden sich entweder in der Datei >><​fc #​008000>/​etc/​apache2/​https.conf</​fc><<,​ >><​fc #​008000>/​etc/​apache2/​apache2.conf</​fc><<​ oder >><​fc #​008000>/​etc/​apache2/​conf.d/​security</​fc><<​ 
 + 
 +Um die Bereitstellung der Serversignatur zu deaktivieren,​ stellen Sie bei den beiden Parameter folgende Werte ein: 
 + 
 +<box round green|/​etc/​apache2/​conf.d/​security>​... 
 +//<fc #​808080>#​ ServerTokens 
 +# This directive configures what you return as the Server HTTP response 
 +# Header. The default is '​Full'​ which sends information about the OS-Type 
 +# and compiled in modules. 
 +# Set to one of:  Full | OS | Minimal | Minor | Major | Prod 
 +# where Full conveys the most information,​ and Prod the least. 
 +
 +#​ServerTokens Minimal</​fc>//​ 
 +<fc #​0000FF>​ServerTokens</​fc>​ <fc #​FF0000>​Prod</​fc>​  
 +//<fc #​808080>#​ServerTokens Full</​fc>//​ 
 +... 
 +//<fc #​808080>#​ Optionally add a line containing the server version and virtual host 
 +# name to server-generated pages (internal error documents, FTP directory 
 +# listings, mod_status and mod_info output etc., but not CGI generated 
 +# documents or custom error documents). 
 +# Set to "​EMail"​ to also include a mailto: link to the ServerAdmin. 
 +# Set to one of:  On | Off | EMail 
 +#</​fc>//​ 
 +<fc #​0000FF>​ServerSignature</​fc>​ <fc #​FF0000>​Off</​fc>​ 
 +//<fc #​808080>#​ServerSignature On</​fc>//</​box>​ 
 + 
 +Das Anzeigen der verwendeten >><​fc #​008000>​PHP</​fc><<​ Version wird in der PHP Konfigurationsdatei >><​fc #​008000>/​etc/​php5/​apache2/​php.ini</​fc><<​ gesteuert. Hier ist der Parameter >><​fc #​008000>​expose_php</​fc><<​ auf >><​fc #​008000>​Off</​fc><<​ zu stellen: 
 + 
 +<box green round|/​etc/​php5/​apache2/​php.ini>;​ //<fc #​808080>​Decides whether PHP may expose the fact that it is installed on the server 
 +; (e.g. by adding its signature to the Web server header). ​ It is no security 
 +; threat in any way, but it makes it possible to determine whether you use PHP 
 +; on your server or not. 
 +; http://​php.net/​expose-php</​fc>//​ 
 +<fc #​0000FF>​expose_php</​fc>​ = <fc #​FF0000>​Off</​fc></​box>​ 
 + 
 +Im Anschluss daran laden Sie die Webserverkonfiguration neu: 
 + 
 +<​xterm>#​ <fc #​008000>/​etc/​init.d/​apache2 reload</​fc></​xterm>​ 
 + 
 +Danach werden das Betriebssystem sowie die Apache und PHP Version nicht mehr angezeigt:​ 
 + 
 +<​xterm>​$ <fc #​008000>​wget --save-headers -O- -q http://​wiki.prontosystems.org</​fc>​ 
 +HTTP/1.1 200 OK 
 +Date: Sat, 13 Apr 2013 09:21:07 GMT 
 +<fc #​800000>​Server:​ Apache</​fc></​xterm>​ 
 + 
 + --- //pronto 2013/04/13 11:57// 
 +{{keywords>​apache2 php5 ServerTokens ServerSignature expose_php disable}}
tux/disable_apache_signature.1365845237.txt.gz (20552 views) · Zuletzt geändert: 2013/04/13 11:27 von wikisysop
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0