In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
2025-11-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
Set up user authentication for a directory or file
Add the following configuration to the corresponding CVM configuration file:
AllowOverride AuthConfig
AuthName "The administrator authentication!"
AuthType Basic
AuthUserFile / data/.htpasswd
Require valid-user
The path after Directory is the directory or file to be authenticated by the user, AuthName followed by a custom verification prompt, and AuthUserFile followed by a verification file.
Create a verification file using htpasswd, a tool that comes with apache:
# / usr/local/apache2/bin/htpasswd-cm / data/.htpasswd username
New password:
Re-type new password:
Adding password for user username
# cat / data/.htpasswd
Username:$apr1 $wLVEgNIh$Ne.IU7FgjfPBZsP6SocZ11
The parameter-c means to create a new file, and-m means to encrypt the password with MD5, followed by the path to the authentication file. Username is the user name.
# / usr/local/apache2/bin/apachectl-t
Syntax OK
Check that the configuration file is correct
# / usr/local/apache2/bin/apachectl graceful
Graceful means to reload the configuration file
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.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.