How to hide PHP version php basic security settings

Source: Internet
Author: User
    1. [Root@jbxue/]# curl-i bbs.it-home.org
    2. http/1.1 OK
    3. Server:nginx
    4. Date:tue, 05:45:13 GMT
    5. content-type:text/html; Charset=utf-8
    6. Connection:keep-alive
    7. Vary:accept-encoding
Copy Code

The PHP version has been hidden.

2, the other several 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# the directive accepts a comma-delimited list of function names to disable a specific function.

Display_errors = off# Whether the error message is displayed as part of the output. On the final published Web site, it is strongly recommended that you turn off this feature and use the error log instead. Opening this feature may expose some security information, such as the file path on your Web service, database planning, or other information.

Allow_url_fopen = off# Whether the remote file is allowed to open, it is recommended to close, if the site needs to capture the function to open.

Safe_mode = on# Whether Safe mode is enabled. When opened, PHP will check that the owner of the current script is the same as the owner of the file being manipulated, the same allows the operation, and the other rejects the operation. The only way to turn on Safe mode is if your directory file permissions are fully allocated correctly.

Open_basedir =/var/www/html/jbxue:/var/www/html/168pc# Directory permission control, the PHP program in the Jbxue directory will not be able to access the contents of the 168pc directory. Not in turn. In the Linux/unix system, a colon separates the directories, and Windows uses semicolons to separate the directories.

  • 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.