Alias /test"/var/www/test"<Directory "/var/www/test"> ;Options Indexes MultiViewsAllowOverride AuthConfig # indicates authenticated Order allow, denyAllow from all</Directory> #AllowOverride AuthConfig indicates that authentication is the key setting Step 3:
Created in /var/www/test .htaccess file vi /var/www/test/.htaccess AuthName "frank share web" AuthType Basic AuthUserFile /var/www/test/.htpasswd require valid-user #AuthName Description, just write #AuthUserFile /var/www/test/.htpasswd #require valid-user or require user frank limit is all legitimate users or specified users # password file recommended to use .htpasswd, because apache default system for the beginning of the ".ht" file does not allow external reading by default, the safety factor will be high A little. Step 4:
Is to create the apache verification user htpasswd -c /var/www/test/.htpasswd frank #The first time you create a user you need to use the -c parameter to add users for the second time, you don't need - c parameters If you want to change the password, you can htpasswd -m .htpasswd frank Step 5:
ok, restart the apache service, then visit http://your website address /test If it goes well, it should be able To see a pop-up window for user authentication, just fill in the username and password created in step 4. For the performance of the server, it is generally not recommended to use AllowOverride AuthConfig or AllowOverride ALL, because this will cause the server to constantly search for .htaccess, which affects the performance of the server. Generally, we may need to verify some background management interface or other special directories. demand.
Use the group policy to restrict the permission of the executable exe of the website directory, whic
Click on the group and click on New Group in the right frame to creat
For security reasons, it is not allowed to ping the external command on Windows Se
Friends who have a certain understanding of the network or server may see FTP related knowledge, and
Top Ten Steps to Building a Secure Personal Web Server
Windows2003 server time synchronization interval modification
Nginx supports shtml format method
Identify whether it is fifteen ways of cloud computing
Incremental backup of websites using rsync (from linux to windows)
Data center energy consumption reduction Eight extreme methods revealed
Nginx reports "readv() failed (104: Connection reset by peer)"
Guess how many years this computer has been used
How to solve win7 shutdown slow?
Windows 7 environment directly installed low version of XP system
How to recover data loss after reinstalling the system
Win7 internal and external networks can ping but can not access the Internet how to solve
DNF86 version silver month violence brush map plus recommended
How to set up Win7 computer standby? Win7 set the computer standby method
How Windows 10 connects to the workspace to manage your computer
Windows 7 modified program background color eye
Win7 system update patch prompt error code "0X80070643" how to do