Skip to content
TheChatArchiveThe Chat Archive
Microsoftwizardlm-70b· MicrosoftHugging Face Arena Human Preference 55K

How do you hide apache version on oracle linux

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with vicuna-33b’s answer.
  1. User

    How do you hide apache version on oracle linux

  2. Microsoft Assistant

    To hide the Apache version on Oracle Linux, you can follow these steps:

    1. Create a custom banner:

    First, create a custom banner file in the Apache configuration directory. In Oracle Linux, the default Apache configuration directory is /etc/httpd/conf. You can create a new file named "hide-version.conf" with the following content:

    Header set ServerSignature "Apache (optimized by Oracle) via mod\_status"
    Header set ServerTokens Prod
    Header set X-Powered-By "Apache (optimized by Oracle)"
    Header set X-Server "Apache (optimized by Oracle) mod\_status"
    Header set X-UA-Compatible "IE=Edge,chrome=1"
    

    Save and close the file.

    1. Enable the custom banner:

    Next, you need to enable the custom banner. You can do this by creating a symbolic link between the custom banner file and the Apache modules directory. Run the following command:

    sudo ln -s /etc/httpd/conf/hide-version.conf /etc/httpd/conf/modules.d/hide-version.conf
    
    1. Disable the ServerTokens directive:

    By default, the ServerTokens directive is set to "Full" in the Apache configuration, which reveals the Apache version. To disable it, edit the Apache configuration file in the /etc/httpd/conf directory. The file is named "httpd.conf". Look for the ServerTokens directive and change it to "Prod" as follows:

    ServerTokens Prod
    

    Save and close the file.

    1. Restart Apache:

    Finally, restart the Apache service to apply the changes:

    sudo systemctl restart httpd
    

    Now, when you access the server's status page, you should see the custom banner without the Apache version. To verify the changes, you can visit http://yourdomain.com/server-info in your web browser.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.