Powered by phpurl designed by nile

Powered by phpurl designed by nile

Администрируем и настраиваем Windows, Linux.

Если вы читали предыдущую мою заметку, где мы заставили Apache стать менее многословным, вы уже сделали половину дела. Но не всю. Но если вы используете php модуль в вашем веб-сервере, тогда вам нужно сделать дополнительную настройку, дабы заставить заткнуться и php.

После применения директив ServerTokens и ServerSignature из вышеуказанной статьи, если мы проверим обычный html файл, мы получим следующий ответ:

Все выглядит отлично. Но если мы сделаем тоже самое для php файла, то получим следующее:

Упс… Как вы можете заметить php добавляет свой собственный баннер:

X-Powered-By: PHP/5.1.2-1+b1

Давайте посмотрим что можно сделать. Нам необходимо изменить переменную expose_php в файле php.ini, установив её в значение off.

По умолчанию expose_php имеет значение On.

В файле php.ini (в разныех Linux дистрибутивах он может иметь различное местоплолажение, например /etc/php.ini, /etc/php5/apache2/php.ini, и т.д.) найдите строку содержащую “expose_php On” и установите её значение в Off:

После этого ваш веб сервер не будет показывать информацию о версии PHP. Продолжим в следующих выпусках.

Постовой

В порядке вяло текущего ремонта решил оформить заказ кухни. Нашел неплохие кухни эконом класса, заказал. Доставили быстро, собрали качественно, рекомендую всем!

How can I remove X-Powered-By header in PHP? I am on an Apache Server and I use php 5.21. I can’t use the header_remove function in php as it’s not supported by 5.21. I used Header unset X-Powered-By, it worked on my local machine, but not on my production server.

If php doesn’t support header_remove() for ver | improve this question

8 Answers 8

I think that is controlled by the expose_php setting in PHP.ini:

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.

There is no direct security risk, but as David C notes, exposing an outdated (and possibly vulnerable) version of PHP may be an invitation for people to try and attack it.

Читайте также:  Смс код м видео

PHPurl Version 2.0 BETA 06

Author: Patrik Ohlson

Collaborators

  • Lucas Krupinski
  • André Tabarra

Original code by:

License

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License (GPL) as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

  1. Clone the repo git clone https://github.com/eolix/PHPurl.git and upload to your host
  • If you want PHPurl in a subfolder of your web root you have to edit the htaccess.example file:

The line: "RewriteRule ^([a-zA-Z0-9]+)/?$ /go.php? >

becomes: "RewriteRule ^([a-zA-Z0-9]+)/?$ /subfolder/go.php? >

  • Save the file as .htaccess
  1. Open /inc/config.php.example . Edit the lines with the correct information for your Domain Name and Mysql info. Save the resulting file as /inc/config.php You can safely remove the config.php.example afterwards.

For the domain name, configure the subfolder (if any) your redirect script is, for example:

Ссылка на основную публикацию
Adblock
detector