In LINUX, how does one authenticate HTTPD users?

Source: Internet
Author: User
Article Title: How to authenticate HTTPD users in LINUX ?. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
[Mentioned in anonymous's masterpiece :]
  
: In linux httpd server, how does one configure user authentication in the CONF file?
  
: In-service ACCESS. It seems that there is no response in CONF,
  
: For example, ACCESS. Setting deny from all in CONF seems useless !!
  
: I want to know how to ensure that only LINUX users can access HTTPD SERVER.
  
: (Or a group)
  
Access and user authentication in httpd can be performed in the global or directory, or at the same time.
  
The default file for server control is access. conf. Generally, only sysop has the right to change the directory access control. htaccess (available in srm. conf), because everyone can create. htaccess. you can set up access control for your own directories .. Because the two
  
The method is similar. the following only describes the access. conf file: # The following is an explanation.
  
  
  
Options shortdes # allow SSI
  
AuthType Basic # it seems that this type is supported now
  
AuthName "Ali's Homepage"
  
AuthUserFIle/home/www/ali/. htpasswd # User passwd file
  
AuthGroupFile/home/www/ali/. htpgroup # User Group file
  
  
  
# Restrict access to hosts
  
Order deny, allow
  
Allow from gzsums.edu.cn
  
Deny from all
  
# Deny from all reject all
  
# Restrict access to users,
  
Require user ali, last
  
# Allow ali and last access to this directory # require user valid-user includes all users in. htpasswd
# Host-based control priority is higher than user-based # so... this directory is accessible only when ali and last are in * .gzsums.edu.cn.
  
  
  
  
  
. Htpasswd is created using the htpasswd command. check whether the directory is correct. ps-ax checks the httpd PID, and kill-1 PID.
  
Enjoy it.
  
  

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.