Jump to content

[SOLVED] Remove PHP Information


Ninjakreborn

Recommended Posts

If you have a server, and it has directory listings on, the obvious thing to do is bring in HTAccess and fix that.

I did that, then when the directory doesn't come up this come's up.

 

www.domainname.com

03/09/07 10:17:57

Apache/2.2.3 (Win32) DAV/2 mod_ssl/2.2.3 OpenSSL/0.9.8d mod_autoindex_color PHP/5.2.0

Either way that is a hell of a lot of information, is there a way to remove all of that, and just have the

"Access Forbidden" text that is above this, thanks.

Link to comment
Share on other sites

If you add the following to an .htaccess file:

Options -Indexes

Then it should come up with 404 Forbidden message. When you browse to a directory that doesn't have a index file it in it.

 

Or add this:

ServerSignature Off

to an .htaccess file and the server signature should not show - which is this bit:

Apache/2.2.3 (Win32) DAV/2 mod_ssl/2.2.3 OpenSSL/0.9.8d mod_autoindex_color PHP/5.2.0

Link to comment
Share on other sites

Do you know what the AllowOverride option is set to in the httpd.conf for the main <Directory /> area ( found around line 200 in the httpd.conf).

 

It must have the following two options listed: FileInfo and Indexes or set to All in order for the configuration options in the .htaccess file to be applied otherwise Apache will just ignore what is set in the .htaccess file.

Link to comment
Share on other sites

Perfect, I will check into that.

So pretty much different things have to be turned on/turned off in order to allow it to be physically affected by HtAccess.

You must give Apache sufficient configuration with the AllowOverride directive in order for Apache to abide by the configuration set forth in the .htaccess.

 

If you don't have FileInfo listed in the AllowOverride directive then Apache will ignore .htaccess files.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.