Hide X-Powered-By: PHP

About two weeks ago I showed a simple way to beautify your URLs and hide the use of PHP as the backend of your web site. Since I got a lot of emails from people indirectly asking me how to also hide the X-Powered-By: PHP header which is still showing up in ones web server's HTTP response.

As so much in our beautiful world of IT it's very easy:

  1. Open your php.ini in the editor of your trust.
  2. Find this line:
    ; 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.
    expose_php = On
    
  3. Change the On to an Off:
    expose_php = Off
    
  4. Reload your Apache and the X-Powered-By: PHP header is gone.

Very easy, no magic(k), and no rocket science.

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Kai 'Oswald' Seidler writes about his life as co-founder of Apache Friends, creator of XAMPP, and technology evangelist for web tier products at Sun Microsystems.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today