Vadorequest Vadorequest - 1 month ago 16
Apache Configuration Question

How to disable X-Powered-By on OVH mutualized server using apache?

I tried to disable both

X-Powered-By
and
Server
for security concerns by adding the following to my .htaccess in a OVH mutualized server.

<IfModule mod_headers.c>
# Security disable headers. http://www.shanison.com/2012/07/05/unset-apache-response-header-protect-your-server-information/
Header unset Server
Header unset X-Powered-By
</IfModule>


But it doesn't work, I still get these headers when running HTTP requests. Why? It is not possible because somehow the mod_headers.c is not loaded on a mutualized server?

Answer

There is a PHP function as well which is able to do this:

<?php
header_remove("X-Powered-By");
?>

http://php.net/manual/en/function.header-remove.php

Hope this help

Comments