Apache user authentication, domain jump, Apache access log

Source: Internet
Author: User
Tags apache access log
Apache user authentication

Open the site directly pop-up user name password, correct before you can view the site, this is called Apache user authentication.

Edit the configuration file (because we are using Apache virtual host, so we enter the configuration of the virtual host)
vim /usr/local/apache2.4/conf/extra/httpd-vhosts.conf

Add the following paragraph to the configuration file
<Directory /data/wwwroot/yy.com>Specify the directory for authentication
AllowOverride AuthConfigThis is equivalent to turning on the authentication switch
AuthName "yy.com user auth"The name of the custom authentication is not very useful
AuthType BasicThe type of authentication, generally basic,
AuthUserFile /data/.htpasswdSpecify where the password file is located
require valid-userSpecify the user who needs authentication for all available users
</Directory>

Create a password file and user and password
/usr/local/apache2.tpasswd-c-m/data/.htpasswd KJJ

Apache user authentication, domain jump, Apache access log

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.