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

Apache configuration-maintaining connectivity and access control

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

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

Main points of content:

1. Analysis of Apache configuration.

Apache connection retention

Apache access control

I. Apache connection retention

Parameters related to Apache connection retention

KeepAlive

Whether to open and keep the connection, OFF closed, ON open.

KeepAlive' Timeout

The maximum interval between multiple requests for a connection, after which two requests are disconnected.

MaxKeepAliveRequests

The maximum number of requests that can be transmitted at a time

II. Overview of Apache access control

Apache access control

1. Function

Control access to website resources

Add access authorization to a specific site directory

2. Common access control methods

Client address limit

User authorization restrictions

3. Access control based on client address

Use Require configuration items to implement access control and restrict them sequentially

Can be used in, and configuration segments

4. Common syntax of Require configuration items

Require all qranted Require all deniedRequire localRequire [not] host Require [not] ip

[root@localhost ~] # vim / etc/httpd/conf/httpd.conf/vhost.conf / / configure files, configure blacklists, and set access permissions in virtual host configuration

III. Restrictions on user authorization

1. Create a user authentication database

[root@www ~] # htpasswd-c / etc/httpd/conf/pwd webadmin create user authentication database New password:Re-type new password:Adding password for user webadmin [root@www ~] # cat / etc/httpd/conf/pwd View settings webadmin:$apr1 $UENqa9TA$k/6Kb.IhlKdQ6QVTxsZs1

2. Add user authorization configuration

[root@www ~] # vim / etc/ttpd/conf/httpd.conf add user authorization configuration

< Directory "/usr/local/httpd/htdocs" >

.AuthName "DocumentRoot" AuthType BasicAuthUserFile / etc/httpd/conf/pwdRequire valid-user [root@www ~] # systemctl restart httpd restart service

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

Network Security

Wechat

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

12
Report