Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the security setting of apache under win2003?

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

Apache under the win2003 security settings is how, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.

It is well known that when Apache is installed as a service for the first time under windows, it runs as the user "System" (local system account). If all the resources of the web server are on the local system, there will be less problems, but it will have a lot of security permissions to affect the local machine, so you must not open the network permissions of the System account, so you need to create a new account to start apache instead of this account and set the appropriate permissions:

1. Create an account in the local users and groups in the computer management, for example: apache, set the key to apacheuser, and join the guests group (if there is a problem, you can grant user permission)

two。 Open "start"-> "Administrative tools"-> "Local Security Policy", select "Log in as a Service" in user permission assignment, and add apache users

3. In computer management, select the service, find apache2.2, stop the service first, right-click-> attribute, select login, switch the checkbox from the local system account to this account, then check zhao, select apache, enter the secret key apacheuser, and then click OK (at this time apache can not start normally, generally there will be an error: Apache2.2 service is stopped due to 1 (0x1) service error. )

4. Give apache installation directory (e.g. D:/apache2.2) and web directory (such as D:/wwwroot) apache account read and write permissions, remove all permissions in each disk root directory except administror and system, and give apache account readable column directory permissions in the disk root directory where the apache installation directory is located (I didn't think it was necessary at first, but later found that this is the key to the above error. )

5. Start apache, everything OK.

PHP temporarily uploads directory and session saves directory specified in 6.php.ini, and gives directory apache full control, for example:

Upload_tmp_dir = "D:/wwwroot/Tmp/uploadtmp/"

Session.save_path = "D:/wwwroot/Tmp/sessiontmp/"

7. Give D:/php directory read and run permissions

8. Give zend installation directory permission to read and run

9. Restrict read access to the directory, modify the httpd.conf under the conf folder under the apache installation directory, and add:

Php_admin_value open_basedir "D:/wwwroot" baby named http://www.bbqmw.net/qm_yeqm

Php_admin_value safe_mode On

Httpd.conf configuration (if PHP read and write permissions are limited to the E:\ smis directory)

Example Apache2.0 configuration:

The copy code is as follows:

ServerName www.abc.com

DocumentRoot "E:/smis"

Options FollowSymLinks IncludesNOEXEC Indexes

DirectoryIndex index.html index.htm default.htm index.php default.php

AllowOverride None

Order Deny,Allow

Allow from all

Php_admin_value open_basedir "Elux SmiisCompact" Elux SmiisCompact Erio Unix APMServ5.2.0 Universe PHPSERV5.2.0 Universe

Php_admin_value safe_mode On

Example Apache2.2 configuration:

The copy code is as follows:

ServerName www.abc.com

DocumentRoot "E:/smis"

Options FollowSymLinks IncludesNOEXEC Indexes

DirectoryIndex index.html index.htm default.htm index.php default.php

AllowOverride None

Order Deny,Allow

Allow from all

Php_admin_value open_basedir "Elux SmiisCompact" Elux SmiisCompact Erio Unix APMServ5.2.0 Universe PHPSERV5.2.0 Universe

Php_admin_value safe_mode On

Apache, php, mysql installation and virtual host and directory permissions settings under win2003 system

Under the win2003 system, apache, php, mysql installation and virtual host and directory permission settings, namely WAPM.

But unlike packaged WAPM software, this software department recommends deployment on formal servers. Here's how to start:

1 install pache, php, mysql

Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report