Discuz! How to set security in the X3 configuration file

Source: Internet
Author: User
Different sites have different security requirements. the Discuz launched by Comsenz! The system allows the site administrator to adjust the security level of the site freely by customizing the Forum security settings in config. inc. php in the configuration file. it also enhances the security performance and defense performance of the Forum. Is Discuz! After the default installation, different sites in the config file have different security requirements. the Discuz launched by Comsenz! The system allows the site administrator to adjust the security level of the site freely by customizing the Forum security settings in config. inc. php in the configuration file. it also enhances the security performance and defense performance of the Forum.

Is Discuz! After the default installation, the default settings of the config file. if the administrator needs to change the security settings, find the config file in the Forum directory, open it, and save the changes. When editing the configuration file, you can use notepad or other programming software.
The following describes the options related to Forum security settings:
1. $ forumfounders = '1 ';
UID, founder of the Forum.
It supports multiple founders separated by commas. The permissions of the founder will be higher than that of the common administrator. some important functions in the background can be managed only after the founder logs on, such: management personnel, template management, database backup and recovery, access to UCenter, etc. Therefore, by setting the founder account of the forum, you can greatly improve the security level of the Forum. For more information about how to add Forum creators, see http://www.jcwcn.com/article/2009/1016/article_32022.html.

2. $ attackevasive = 0;
The forum defense level prevents DoS attacks caused by a large number of abnormal requests. The meaning of each data item is: 0 = disabled, 1 = cookie refresh limit, 2 = restrict proxy access, 4 = second request, 8 = answer questions (you need to answer questions during the first visit ). If you need to set multiple defense levels, you can use "|" to combine the numbers of different levels. for example, when limiting proxy access and requiring the first access to answer a question, you can set this item to 2 | 8.
3. $ urlxssdefend = 1;
The forum access page protection switch.
This prevents users from harming users on this site by using invalid url addresses. the default value is 1, that is, open. it is not recommended to change it to 0.
4. $ admincp = array ();
Security settings for the administrator account.
1) $ admincp ['forcesecques'] = 0;
Management personnel must set security questions before entering system settings, 0 = no, 1 = yes [security].
This adds a security barrier for forum administrators to enter the background. only when the administrator password and security questions are filled in correctly can they enter the background.
2) $ admincp ['checkip'] = 1;
Whether the administrator's IP address is verified for background management operations. 1 = yes [security], 0 = no. Set 0 only when the administrator cannot log on to the background.
Setting the IP address of the verification administrator can prevent the administrator account from logging on to the background of the Forum in multiple places and ensure the uniqueness of the management of the background of the same account.
3) $ admincp ['tpledit '] = 0;
Allow online forum template editing? 1 = yes 0 = no [security]
The default value is 0. when it is set to 1, the administrator can see the words "edit" and "delete" in the management center> interface> Template management> details of the corresponding template, otherwise, only the words "view" are displayed, that is, online template editing is not allowed. In general, it is not recommended to set this option to allow online editing. copy the template file and then edit it to ensure the integrity of the original template file, the page errors caused by improper modification can be promptly restored.

4) $ admincp ['runquery'] = 1;
Whether to allow SQL statement 1 in the background = 0 = no [security]
The default value is 1, that is, the administrator can view the text box that can enter custom SQL statements in the management center => Tools => database => upgrade. when it is changed to 0, this text box is not displayed. you can only run built-in SQL statements in the background. When SQL statements are allowed to run, do not run SQL statements easily unless they are completely correct. Make sure to back up the SQL statements before running them. otherwise, improper operation may cause data loss or database damage, the consequences are very serious.

5) $ admincp ['dbimport '] = 1;
Whether to allow the background to recover Forum data 1 = 0 = no [security]
The default value is 1, that is, the administrator is allowed to restore data in the management center => Tools => database => Recovery. when the value is changed to 0, select this option, A message indicating that data cannot be restored appears. When the backup file to be restored is confirmed to be up-to-date and correct, data can be restored again, effectively preventing Forum data loss caused by wrong backup recovery.

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.