UnixServerAdmin

Server Administration & Management

How to hide PHP version

Find your php.ini file

# vi /usr/local/lib/php.ini

and look for the line that says “expose_php On“ Change it to “expose_php Off“

Restart your HTTP service

# /etc/init.d/httpd restart

Done! No more PHP version number in your HTTP response header

Advertisements

April 19, 2011 - Posted by | PHP, Security | , ,

3 Comments »

  1. Thanks a ton for bothering to line all of this out for people. This kind of blog post has been very helpful if you ask me.

    Comment by Louann Witterstauter | June 15, 2011 | Reply

  2. I was seriously searching for anything at all on this topic and your blogging flawlessly accommodates my current desires. Please blog much more along these lines? Visitors need to find this knowledge as well as the kind of unbiased opinion which you supply.

    Comment by clean water | June 15, 2011 | Reply

  3. I was seriously looking for anything at all for this subject matter and your blogging flawlessly suits my present needs. Please blog more along these lines? Visitors must find this knowledge and the sort of fair judgment which you provide.

    Comment by clean water | June 16, 2011 | Reply


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: