First step: Set Apache run permissions.
After the DEDEAMPZ is installed on the windows2003 system, the Apache service is run with the user "system" (Local System account). This leaves a security risk for the server. So, create a new account to run Apache instead of system and set the appropriate permissions.
1. Create an account in Computer Management > Local Users and Groups >, for example: Web, password set to: Yuzhenhai.
2. Open Start > Admin tools > Local Security Policy, select "Log on as service" in User Rights Assignment and add Web users.
3. Computer Management Select Services, find apache2.2, first stop the service, right click > properties, select Login, switch the radio box from the local System account to this account, and then find, select the Web, enter the password Yuzhenhai, Then click OK (this time Apache does not start properly.) )
4. Remove all the disk root directory except Administror and system of all permissions, if the Dedeampz installed in D disk, give D disk users read and run, column directory, read three permissions.
5. Add Full Control to the Web user rights of the Apache installation directory D:dedeampzprogramapach directory.
6. Add Full Control to the Web user rights of the PHP installation directory.
7.php.ini the specified php temporary upload directory and session save directory D:wwwroottmp, give the Web user Full control of permissions.
8. Restart the Apache service. This way, Apache runs under a low privilege user.
Step two: Configure Apache.
1. Let Dedeampz support. htaccess file.
Open the apacheconfhttpd.conf configuration file and find:
Options Indexes
AllowOverride None
Order Allow,deny
Allow from all
Modified to:
Options Indexes FollowSymLinks
AllowOverride All
Order Allow,deny
Allow from all
2. Turn off Apache to list directories automatically.
Options Indexes FollowSymLinks
AllowOverride All
Order Allow,deny
Allow from all
Modified to:
Options FollowSymLinks
AllowOverride All
Order Allow,deny
Allow from all
3. Turn on gzip compression.
Open the Apacheconfhttpd.conf configuration file and add:
Addoutputfilter DEFLATE HTML xml PHP js CSS
4. Load gzip compression module.
Open the Apacheconfhttpd.conf configuration file and add it in the Load module section:
LoadModule Deflate_module modules/mod_deflate.so
Step three: Open some files and folders Full Control permissions.
index.html view uploads data gives the Web user Full control over permissions.
Step Fourth: Close the execution permissions for the directory in step three.
Add in Virtual Host configuration:
<directory "D:dedecmsuploads" >
<filesmatch ". php" >
Order Allow,deny
Deny from all
<directory "D:dedecmsdata" >
<filesmatch ". php" >
Order Allow,deny
Deny from all
<directory "D:dedecmsview" >
<filesmatch ". php" >
Order Allow,deny
Deny from all
This article comes from "Yu Zhenhai net http://www.yuzhenhai.com", reprint please keep this information.