How to protect the Apache website under Linux system

Source: Internet
Author: User
Tags web services access password protection linux

The wide application and rapid development of Linux benefit from the rapid development of the Internet. Linux does well for Web services that are widely used on the Internet. It's hard to say how many Web sites on the Internet are using Linux, but there is no doubt that the use of Apache servers in many sites is a huge market share.

How to provide protection to the website, prevent illegal user login? You can usually use the identity authentication method. Identity authentication is an effective means to prevent illegal users from using resources, and also an effective way to manage registered users. Many Web sites now use identity authentication to manage user resources, restricting access to users strictly. The traditional authentication method is to check the user's registration name, password, to decide whether to allow users to use resources, but this authentication method in some cases does not work very effectively. Especially in the Linux platform under the Apache server, can use the Linux method to achieve password authentication and protection.

The most common method of password protection under Linux is to use the. htaccess file, the directory configuration for password protection, which is also one of the features of the. htaccess file. This approach allows unauthorized viewers to access the restricted area set by the. htaccess file. Generally, the password set using JavaScript technology is too simple to be cracked easily, causing insecurity. Using the. htaccess file to protect the directory is more efficient and secure than using other programs (JAVA/HTML/ASP/CGI). More importantly, the use of the. htaccess way to set up, do not need to write a program can be implemented, the specific operation is relatively easy.

The following is to introduce and demonstrate Linux+apache password protection methods, the full implementation of the site protection.

What is a. htaccess file

The. htaccess file is a setup file on the Apache server. It's a text file, you can write with any text editor. The. htaccess file provides a way to change the configuration of a directory by placing a file (. htaccess file) containing one or more directives in a specific document directory to work on this directory and all its subdirectories ... The htaccess features include setting the Web page password, setting the file that appears when an error occurs, changing the file name (such as index.html) on the front pages, prohibiting reading of file names, redirect files, adding mime categories, and forbidding files in the column directory.



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.