User authentication for Apache
vim/usr/local/apache2.4/conf/extra/httpd-vhosts.conf//The 111.com virtual host is edited into the following content
<virtualhost *:80>
DocumentRoot "/data/wwwroot/111.com"
ServerName 111.com
Serveralias www.example.com
<Directory/data/wwwroot/111.com>
AllowOverride authconfig
AuthName "111.com User auth"
AuthType Basic
authuserfile/data/.htpasswd
Require Valid-user
</Directory>
Errorlog "Logs/111.com-error_log"
Customlog "Logs/111.com-access_log" common
</VirtualHost>
Apache Authentication for individual files
vim/usr/local/apache2.4/conf/extra/httpd-vhosts.conf//The 111.com virtual host is edited into the following content
<virtualhost *:80>
DocumentRoot "/data/wwwroot/111.com"
ServerName 111.com
Serveralias www.example.com
<filesmatch 123.php>
AllowOverride authconfig
AuthName "111.com User auth"
AuthType Basic
authuserfile/data/.htpasswd
Require Valid-user
</FilesMatch>
Errorlog "Logs/111.com-error_log"
Customlog "Logs/111.com-access_log" common
</VirtualHost>
Domain Jump
Access logs for Apache
Apache user authentication, domain jump, Apache access log