Home CMS Tutorial DEDECMS How to set up the security environment of Dreamweaver server

How to set up the security environment of Dreamweaver server

Jan 11, 2020 am 09:07 AM
dream weaving

How to set up the security environment of Dreamweaver server

How to set up the environment security of DedeCMS server?

DedeCMS server environment security settings

Recommended learning:伟梦cms

The current Internet environment is becoming more and more severe. Security has always been a problem that cannot be ignored by program developers and webmasters. How to choose an easy-to-use and safe program? Building a secure server environment has always been something that most webmasters are eager to know. This article combines the server and DedeCMS to configure a safe environment.

1. Directory permissions

We do not recommend that users set the column directory in the root directory because it will be very troublesome to set up security in this way. By default, after the installation is completed, the directory The settings are as follows:

(1) Data, templets, uploads, a or 5.3 html directory, set readable, writeable, non-executable permissions;

(2) If no special topic is required, it is recommended To delete the special directory, you need to delete special/index.php after generating HTML and then set the directory to read, write, and non-executable permissions;

(3) include, member, plus, and background management directories Set as an executable script, readable but not writable (if additional modules are installed, the book, ask, company, and group directories are also set in this way).

2. Other issues that need attention

(1) Although the install directory has been strictly processed, for the sake of safety, we still recommend deleting it;

( 2) Do not directly use the MySQL root user's permissions on the website. Set up an independent MySQL user account for each website. The permissions are:

SELECT, INSERT, UPDATE, DELETE

CREATE, DROP , INDEX, ALTER, CREATE TEMPORARY TABLES

Since DEDE does not use stored procedures anywhere, be sure to disable FILE, EXECUTE, etc. permissions to perform stored procedures or file operations.

3. How to set the permissions of the directory?

For users who know how to use Linux, I believe most of them already know these things. For IIS users, please see the picture below:

3.1 Set the directory to read-only permissions

First Copy the permissions

How to set up the security environment of Dreamweaver server

Set the directory to read-only permission

How to set up the security environment of Dreamweaver server

3.2 Set the directory to not allow script execution

How to set up the security environment of Dreamweaver server

In addition, it should be noted that neither IIS nor Apache should add .php and .inc files to mime, otherwise the system will prohibit downloading of these files.

4. Apache site security settings

If you are under Windows 2003, you can perform the following operations on Apache:

4.1 Create an account in the local users and groups in computer management , for example: DedeApache, set the password to DedeApachePWD, join the guests group (if a problem occurs, you can grant user permissions);

4. 2 Open Start->Administrative Tools->Local Security Policy, in "User Select "Log in as a service" in "Permission Assignment" and add the DedeApache user; Select the box to switch from the local system account to this account, then search and select DedeApache, enter the password DedeApachePWD, and then click OK (at this time, apache cannot start normally, and generally an error will be reported: Apache2.2 service reason 1 (0×1) service Stopped due to sexual error.);

How to set up the security environment of Dreamweaver server4.4. Grant the apache installation directory (for example: D:/apache2.2) and web directory (for example: D:/wwwroot) DedeApache account Read and write permissions, remove all permissions except administrator and system from the root directory of each disk, and grant readable column directory permissions to the apache account of the root directory of the disk where the DedeApache installation directory is located

How to set up the security environment of Dreamweaver serverWe can add the following content in the site configuration:

<Directory "D:\dedecms\www\uploads">       
    <FilesMatch ".php">           
        Order Allow,Deny           
        Deny from all       
    </FilesMatch>   
</Directory>    
<Directory "D:\dedecms\www\data">       
    <FilesMatch ".php">           
        Order Allow,Deny           
        Deny from all       
    </FilesMatch>   
</Directory>    
<Directory "D:\dedecms\www\templets">       
    <FilesMatch ".php">           
        Order Allow,Deny           
        Deny from all       
    </FilesMatch>   
</Directory>    
<Directory "D:\dedecms\www\a">       
    <FilesMatch ".php">           
        Order Allow,Deny           
        Deny from all       
    </FilesMatch>   
</Directory>
Copy after login

This corresponds to canceling the script execution permission of the corresponding directory.

5. Change of data directory path

In addition, in DedeCMS V5.7, users can also set the data directory to the upper level non-web access directory. The basic operation is as follows:

5.1. Move the data directory to the upper level directory, just cut it here;

5.2. Configure the DEDEDATA file in include/common.inc.php

define( 'DEDEDATA', DEDEROOT.'/data');

can be changed to a class such as:

define('DEDEDATA', DEDEROOT.'/../../data');

5. 3. Set the template cache path in the background

The above is the detailed content of How to set up the security environment of Dreamweaver server. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

Repo: How To Revive Teammates
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to import css in DreamWeaver How to import css in DreamWeaver Dec 03, 2020 pm 04:03 PM

How to import css into DreamWeaver: 1. Place the HTML template file in the "templets" folder; 2. Change the suffix of the HTML file to ".htm"; 3. Add "{dede:" in front of the original style path: global.cfg_templets_skin/}" can be used.

Detailed explanation of CMS database file recovery method Detailed explanation of CMS database file recovery method Mar 13, 2024 pm 03:15 PM

The database is the core of website operation and stores important information such as user data and article content. Therefore, the backup and recovery of database files is particularly important during website operation. For websites built using Dreamweaver CMS, the recovery of database files is also a critical task. This article will introduce in detail the recovery method of Dreamweaver CMS database files, and provide specific code examples to help users quickly restore website data and ensure the normal operation of the website. 1. Back up the database file. Before restoring the database file, you first need to ensure that it has been

An article discusses the new features and advantages of Dreamweaver PHP5.7 version An article discusses the new features and advantages of Dreamweaver PHP5.7 version Mar 21, 2023 am 09:36 AM

Dreamweaver is a very famous CMS. It is used by many websites due to its simplicity and ease of use. Its backend is developed using PHP, and the latest official version is Dreamweaver PHP 5.7. In this article, we will explore the new features and advantages of DreamWeaver PHP 5.7 version.

How to solve the problem if Dreamweaver fails to install php7.0 How to solve the problem if Dreamweaver fails to install php7.0 Mar 23, 2023 am 11:11 AM

It is a common situation to encounter problems when installing Dreamweaver. One of the possible problems is that php7.0 cannot be successfully installed. In this article, we will explain how to solve this problem.

A brief analysis of the PHP version and number of components required for DreamWeaver A brief analysis of the PHP version and number of components required for DreamWeaver Mar 21, 2023 am 10:50 AM

DreamWeaver is a very popular website construction system, and its architecture is based on the PHP language. Therefore, Dreamweaver requires PHP to run. So, specifically, how many PHPs are needed to weave dreams? This is not a simple question. This article will introduce the PHP version and number of components required for Dreamweaver from the following aspects.

Is cms a dream weaver? Is cms a dream weaver? Mar 01, 2023 am 09:58 AM

cms is not Dreamweaver, cms refers to content management system, and Dreamweaver is just a kind of cms; Dreamweaver cms refers to Dreamweaver content management system, and content management system is a kind of WEB front-end and back-end office system or process. A software system between websites; cms has many excellent designs based on templates, which can speed up website development and reduce development costs.

What version of php is required for DreamWeaver? What version of php is required for DreamWeaver? Jun 06, 2023 pm 01:20 PM

Dreamweaver requires PHP version 5.2 and above. The installation method: 1. First install PHP and configure the environment; 2. Download the DedeCMS installation package and extract it to the root directory of the website; 3. Open the website URL and follow the prompts to complete the installation; 4. After the installation is complete, you can access the Dreamweaver backend through http://localhost/yourwebsite.

Master the key points of Dreamweaver PHP5 Master the key points of Dreamweaver PHP5 Mar 26, 2024 am 11:12 AM

Dreamweaver CMS is an open source content management system developed based on PHP5 and is widely used in the field of website construction. It is very important for developers to master the key points of Dreamweaver PHP5. This article will introduce some key points and provide specific code examples to help readers better understand and apply DreamWeaver PHP5. 1. Files included in the development of DreamWeaver CMS often require data sharing and code reuse between different files. PHP's file inclusion feature is an effective way to solve this problem. In DreamWeaver CMS, often

See all articles