Hide PHP basic security settings

Source: Internet
Author: User
Hide PHP basic security settings

  1. [Root @ jbxue/] # curl-I bbs.it-home.org
  2. HTTP/1.1 200 OK
  3. Server: nginx
  4. Date: Tue, 20 Jul 2010 05:45:13 GMT
  5. Content-Type: text/html; charset = UTF-8
  6. Connection: keep-alive
  7. Vary: Accept-Encoding

The PHP version is hidden.

2. other basic PHP Security settings:

Disable_functions = phpinfo, system, exec, shell_exec, passthru, popen, dl, proc_open, popen, curl_exec, curl_multi_exec, parse_ini_file, show_source # This Command accepts a list of functions separated by commas, to disable a specific function.

Display_errors = Off # whether to display the error information as part of the output. On the final web site, we strongly recommend that you disable this feature and use error logs instead. Enabling this feature may expose some security information, such as the file path, database planning, or other information on your web service.

Allow_url_fopen = Off # whether to enable remote files. we recommend that you disable it. if the website requires the collection function, you can enable it.

Safe_mode = On # whether to enable security mode. When the script is opened, PHP checks whether the owner of the current script is the same as the owner of the file to be operated. if the owner is the same, the operation is allowed. Otherwise, the operation is rejected. The prerequisite for enabling security mode is that your directory file permissions have been fully assigned.

Open_basedir =/var/www/html/jbxue:/var/www/html/168 pc # directory permission control. The php program in the jbxue directory cannot access the contents in the 168pc directory. This is not the case. In Linux/UNIX systems, use colons to separate directories, and use semicolons to separate directories in Windows.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.