Ubuntu Linux

Hide Apache Information & PHP software version

Hide Apache Information To hide the information, add the following two apache directives in Apache configuration file

/etc/apache2/apache2.conf

ServerTokens ProductOnly

ServerSignature Off

Now you need to restart your web server using the following command

#/etc/init.d/apache2 restart

Now the output for apache header looks like below

Server: Apache

Hide PHP Version Details If you want to hide the PHP version you need to edit the

/etc/php4/apache/php.ini (For php4 users) file and

/etc/php5/apache/php.ini (For php5 users)

Change the following option

expose_php On

to

expose_php Off

Now you need to restart your web server using the following command

#/etc/init.d/apache2 restart

After making this change PHP will no longer add it’s signature to the web server header. If you are running php from cli against a php file, the output is a html file (as seen by a browser). In some distributions (like Debian) the php-cli is controlled by a different php.ini file (/etc/php[4,5]/cli/php.ini).

 

http://www.debianadmin.com/apache-tipshide-apache-information-php-software-version.html

About Suendri

Owner dan Founder Go Software Media sebelumnya bernama PHPBeGO Foundation

Discussion

No comments yet.

Tinggalkan Komentar

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

Follow Go Software Media Blog on WordPress.com

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 63 other followers

Archives

%d bloggers like this: