Modification de la sécurité Apache ou masquage des informations de version

Avant de modifier les informations de version d'Apache
    avant l'installation, modifiez le fichier d'origine httpd-2.2.31/include/ap_release.h comme suit :
     40 #define AP_SERVER_BASEVENDOR "IIS"
     41 #define AP_SERVER_BASEPROJECT "IIS HTTP Server"
     42 #define AP_SERVER_BASEPRODUCT "IIS"
     43
     44 #define AP_SERVER_MAJORVERSION_NUMBER 7
     45 #define AP_SERVER_MINORVERSION_NUMBER 0
     46 #define AP_SERVER_PATCHLEVEL_NUMBER 0
     47 #define AP_SERVER_DEVBUILD_BOOLEAN 0
    Editez le fichier httpd-2.2.31/os/unix/os.h et modifiez-le comme suit :
        35 #define PLA FORMULAIRE T "win64 "
    
masque
    les informations sur la version d'Apachevi /application/apache/conf/extra/httpd-default.conf Modifiez le contenu suivant :
        ServerSignature off
        ServerTokens prod
    vi /application/apache/conf/httpd.conf Supprimez le commentaire # suivant
        Incluez conf/extra/httpd-default.conf
    Vérifiez la syntaxe : /application/apache/bin/apachectl -t
    Redémarrage en douceur : /application/apache/bin/ apachectl Graceful    
    Voir l'effet : curl -I 192.168.31.36

Guess you like

Origin blog.csdn.net/weixin_42272246/article/details/130962178