Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»Security»How to Hide Apache Version from HTTP Header

    How to Hide Apache Version from HTTP Header

    RahulBy RahulOctober 25, 20162 Mins ReadUpdated:January 29, 2017

    When you configure your production and development infrastructure. The primary concern should be security. You may face serious consequences in the future. You must apply to security in many directions. In that, If you are running your application with Apache server, you should apply this security tip on your server.

    Check Unsecure HTTP Header

    Check the HTTP header of your server, You will see the version of Apache2 server running. Hackers can use this information for hacking.

    $ curl -I  http://example.com
    

    You can see that your server is running with Apache 2.4.18 server.

    HTTP/1.1 200 OK
    Date: Wed, 25 Oct 2016 11:36:14 GMT
    Server: Apache/2.4.18 (Ubuntu)
    Last-Modified: Thu, 20 Oct 2016 05:30:08 GMT
    ETag: "2c39-544c560e55e60"
    Accept-Ranges: bytes
    Content-Length: 11321
    Vary: Accept-Encoding
    Content-Type: text/html
    

    Hide Apache Version

    Edit your Apache configuration file and Add/Edit following variables. After making changes restart your Apache service.

     ServerTokens Prod
     ServerSignature Off
    

    Check HTTP Header

    After making above changes, re-check the HTTP header values using the following command.

    $ curl -I  http://example.com
    

    Now you can see that header is only showing that Apache is running, but no version or OS details available there.

    HTTP/1.1 200 OK
    Date: Wed, 25 Oct 2016 11:36:14 GMT
    Server: Apache
    Last-Modified: Thu, 20 Oct 2016 05:30:08 GMT
    ETag: "2c39-544c560e55e60"
    Accept-Ranges: bytes
    Content-Length: 11321
    Vary: Accept-Encoding
    Content-Type: text/html
    
    Apache http header security
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleWhich OS Should You Run on Your NAS
    Next Article How to Hide Nginx Version from HTTP Header

    Related Posts

    How to Install Apache ActiveMQ on Ubuntu 22.04

    3 Mins Read

    How To Install LAMP Stack on Ubuntu 22.04 LTS

    Updated:April 20, 20225 Mins Read

    How To Disable HTTP Methods in Apache

    Updated:December 31, 20212 Mins Read

    How to Install and Configure Fail2ban on Debian 11

    3 Mins Read

    How To Setup Apache, PHP & MongoDB in Ubuntu & Debian

    Updated:October 8, 20213 Mins Read

    Common Apache Commands on Ubuntu & Debian

    4 Mins Read

    5 Comments

    1. Hitesh Prajapati on August 19, 2020 2:30 pm

      Thanks helpful for me.

      Reply
    2. Amit Handa on May 12, 2020 8:07 am

      How to hide server Name?

      Reply
    3. Amit Handa on May 12, 2020 8:06 am

      Thanks!

      Reply
    4. Nm on April 27, 2020 1:06 pm

      Thanks! Quick solution

      Reply
    5. sandy on May 31, 2019 9:17 am

      GREAT bro. many thanx

      Reply

    Leave A Reply Cancel Reply

    Recent Posts
    • How to Enable / disable Firewall in Windows
    • How to Install JAVA on Ubuntu 22.04
    • Switching Display Manager in Ubuntu – GDM, LightDM & SDDM
    • Changing the Login Screen Background in Ubuntu 22.04 & 20.04
    • How To Install PHP (8.1, 7.4 or 5.6) on Ubuntu 22.04
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.