How to configure IIS7 to implement Basic authentication in PHP _php tips

Source: Internet
Author: User
Tags mysql tutorial php tutorial

In the PHP run environment to configure IIS7 implementation of Basic authentication methods, in fact, there are several methods of IIS7 authentication, such as Windows Authentication, Digest authentication, and so on, relatively IIS7 Basic authentication is the simplest one, The following text to introduce the IIS7 Basic authentication methods and considerations, I hope that the introduction of PHP learning Friends help.

Preparatory work

1, because the default IIS7 does not install the Configuration authentication feature, so if you want to implement IIS7 Basic authentication, you must first install the IIS7 authentication function, you need to open

Control Panel > programs and Features > Turn Windows features on or off, locate IIS, select Basic authentication for installation, as shown in

Installing the IIS7 authentication feature

2, in addition to installing the IIS7 authentication function, you also need to configure to run PHP5 on IIS7, please refer to Win7 iis7.5+php Manager installation Configuration Php5+mysql Tutorial and Windows7 IIS7 the FastCGI and ISAPI methods to install the configuration PHP5 Tutorial.

IIS7 Basic Authentication First step: Disable Anonymous Authentication

Open IIS Manager, click a directory under the left side of the Web site, in the right-hand side of the IIS feature view to select Authentication, the Anonymous authentication option, you need to first disable anonymous authentication, because all browsers send to the server the first request is to anonymous access to the server content. If anonymous authentication is not disabled, users can access all content on the server anonymously, including restricted content.

IIS7 implementing Basic Authentication Step Two: Edit Basic Authentication Configuration

After you disable anonymous authentication, you can either enable the default Basic authentication directly, or you can right-click Basic authentication, select Edit, and type the default domain and realm.

IIS7 Basic Authentication Step three: Create authenticated username and password

You can create a user name and password by right-clicking the computer > Admin > Local Users and Groups, as shown in the PHP tutorial network domain name as the user name to create a user

IIS7 Authentication Creation New User

IIS7 Implementation Basic Authentication step fourth: Configure Authenticated Users

Open IIS7 Manager, find the appropriate authentication of the site directory, right to choose Edit Permissions, click on the Security tab, edit the group or user name, select Add, as shown

IIS7 Authentication Configuration User

After the user is added, you can configure the appropriate permissions for the authenticated user according to the security requirements.

After completing the above IIS7 Basic authentication configuration, access to the corresponding directory configured in the form of a web address will require a user name and password to continue accessing the screen, as shown in

IIS7 Authenticated access page

IIS7 Basic Authentication considerations:

1. Basic authentication is considered an unsafe form of authentication because the IIS7 Basic authentication user credentials are encoded using the BASE64 encoding technique, but are not encrypted while the network is being transmitted. Recommended installation Configure SSL

2, IIS7 Basic authentication default error message will jump to the HTTP401 page, you can jump configuration through the error page in IIS7 function view.

So far, the method of implementing Basic authentication on the IIS7 is introduced.

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.