Share a small setting-the server points to local IIS when the project starts

Source: Internet
Author: User

Background, in the X company to do a website login need domain name support, that is, the browser address bar in the form of localhost+ port number can not be implemented login (must be the form of XXXX domain name),

But most of the time we will test online, since there is no local environment, then we have to create an environment.

So, the final form we want is this:

This form of access looks like an extranet (local is the host name of IIS, you can also define it), and it just uses the domain name suffix, the logical verification of the login can be passed.

Here are the specific settings:

1. Prepare IIS Settings

Already very clear, added a website named TCCWPL, specified the site's physical file path after binding the site's IP address and host name, where the IP address can not be assigned, the port number is the default (multiple site ports can not be duplicated), and then give the host a name, The host name is the name of the browser address to access.

About some of the basic configuration of the IIS deployment site is not detailed, the specific can go to see Baidu search provided links, http://jingyan.baidu.com/article/5553fa8215f7ef65a2393413.html

When IIS is configured here, it can be accessed in the browser input localhost.tccwpl.com (note that the following is successful before continuing the process, if it is not possible to access the IIS configuration problem, the following steps do not need to continue)

2. Set the default server in the project's properties

3.IIS and the application configuration will also need to configure the hosts in the Hosts file access

Open the Hosts file and enter the IP domain name to save

Hosts file path C:\Windows\System32\drivers\etc

Enter the IP address at the bottom, and the hostname of the IIS configuration, save and then refresh DNS (Shortcut dos command: IPCONFIG/FLUSHDNS)

4. Visit the website

After you have configured IIS, the application, and the Hosts file, refresh the DNS cache, and then enter the host name in the browser to access the Web site referred to by the physical file under IIS, and when the project is launched, the browser will also display the hostname access, so that the local offline environment can simulate the line running ~ ~ ~

(Nature or local access, only changed hostname, in some cases useful)

Configuration this thing is not difficult, mainly before the configuration of a few times easy to forget so write down the blog record, do not know whether others have used, for the site deployment of some configuration is not very familiar with the general basis is very weak, and so on the back of this piece of familiar to see what can be done to complement, but also hope that we can exchange together and

Share a small setting-the server points to local IIS when the project starts

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.