[IIS website building] How to use a local computer as a server to build a web site and access it from the public network

Table of contents

foreword

Windows web settings

Windows IIS feature settings

IIS web page access test

Cpolar intranet penetration

Download and install Cpolar

Cpolar cloud settings

3.3 Cpolar Local Settings

Public network access test

epilogue


foreword

In various tutorials and introductions on the Internet, building a webpage will rely on the help of various software, such as Apache and Nginx running on the webpage, database software MySQL and MSSQL, etc. For the convenience of users, there are also XAMPP, PHPStudy, and pagoda panels. A series of integration services, such as , are all for the convenience of us to quickly build a website. Is it impossible to build a website without using these software? The answer is of course no, the Windows system actually integrates the software environment necessary to build a website. Let us take a look today, how to use the website program that comes with Windows to build a website.

Windows web settings

Among the many services that come with the Windows system, there is an IIS service. The full name of IIS is Internet Information Server, which includes Gopher server and FTP server. Installing IIS service means that a web page can be created. Moreover, IIS can also have an editing environment interface "FRONTPAGE", "INDEX SERVER" with full-text search function, "NET SHOW" with multimedia function, and the like.

After understanding what IIS service is, we can start IIS service on our Windows computer and try to create a web page.

Windows IIS feature settings

First of all, we need to open the IIS service of Windows, and these services can be opened in the settings of the start menu. The specific operation method is to open 开始菜单, click the button, and select the item 设置on the page设置应用

20230330092201

After entering 应用the interface, scroll to the bottom of the page and click程序和功能

20230330092202

On 程序和功能the page, click the button on the left 启动或关闭Windows功能, and a small window will appear, which includes the IIS service (Internet Information Server) that we need to install.

20230330092203

As you can see here, there are a lot of content under the Internet Information Server project, here we have to check Web管理工具and 万维网服务two items. In these two items, it is not necessary to check all the contents. The specific contents that need to be checked are as follows:

20230330092204

20230330092205

After the required items are checked, you can click 确认the button at the bottom of the page to install these items and services

20230330092206

20230330092207

Wait a short time for Windows to notify that the required services have been installed.

20230330092208

At this point we can use the IIS service to create a new web page.

IIS web page access test

After completing the opening of the IIS service, we can start to create web pages. First we open Windows and find the project 控制面板in it管理工具

20230330092209

In 管理工具, you can find Internet Information Server(IIS)管理器the item, double-click to open it, and you can enter the main interface of web page settings.

20230330092210

20230330092211

On the left side of the "Internet Information Server (IIS) Manager" page, you can see the web page under the computer. Generally, Windows will create a page called "Deault Web Site" by default (this page is often attacked by big guys, so we can stop it from running). But we don't want to operate on the page at this time, so don't worry about it.

We 网站right-click the icon, click the right-click menu添加网站

20230330092212

On the pop-up 添加网站page, you can set up the website you plan to create. The specific settings include "website name (to distinguish other existing websites)", "application pool (the website uses those programs to run, do not modify it unless you are an expert)", "physical path" (the root directory of the website you intend to build , since Windows has high requirements on the permissions of the C drive, it is best to establish the root directory of the website under other disks), "IP address" and "port", etc.

20230330092213

In this example, we set up a webpage with the name of the website "test", choose to use the DefaultAppPoolprogram pool, and put the physical path (the root directory of the website) in the newly created website\test folder under the D disk. And IP地址choose all unallocated, the port Then select 8080 (the port here needs to be an unoccupied port, otherwise our webpage will not start due to the port occupation). After completing these settings, you can click the button below to complete the setting of the new website 确定.

Next, after we click on the newly created test web page, find 身份验证the option in the setting box on the right, and double-click to enter the "Authentication" page.

20230330092214

On the "Authentication" page, we find and click 匿名身份验证, and then click the "Edit" button on the right to edit the content of "Anonymous Authentication". The specific editing content is very simple, just check 应用程序池标识it. After editing, click "OK" to save the changes.

20230330092215

Finally, in the "test" webpage setting window, we find and click and double-click, and select directory browsing 目录浏览on the "directory browsing" setting page .启用

20230330092216

20230330092217

After completion, we click on the "test" page on the left to enter the webpage setting window. In order to test whether our webpage can run normally, you can click 浏览the button on the right side of the window to conduct an access test on the newly created webpage.

20230330092218

20230330092219

Here, the webpage has successfully displayed the content without returning an error message such as "404", indicating that our webpage has been established successfully. Among them, newpage.html is the content file created by the author, as long as you click on this file (or add the file name and extension after the domain name), you can display the content in the newly created web page.

20230330092220

When our webpage is successfully created, we can fill it with content. We can obtain webpage script compression packages on the Internet or elsewhere, unzip them to the root directory of the new webpage, and then load the content of the script.

However, web pages that cannot be accessed on the public Internet have no practical significance, so we can use cpolar intranet penetration to publish new web pages created by this ISS service to the public Internet.

Cpolar intranet penetration

Download and install Cpolar

To install cpolar intranet penetration on a local computer, we can visit the official website of cpolar and download the Windows version of cpolar software

cpolar official website: cpolar - a secure intranet penetration tool

20230330092221

20230330092222

After the download of Cpolar is complete, decompress the downloaded file, double-click the decompressed .msifile, and the installation program can be executed automatically. Then just go all the way Nextto complete the installation.

20230330092223

20230330092224

In order to ensure the safety of customer data, cpolar will create an independent data tunnel for each user, supplemented by user password and token code to ensure data security, so we must register cpolar, the registration process is also very simple, just click on the upper right corner of the cpolar home page "User Registration", fill in the necessary information on the registration page to complete the registration.

20230330092225

20230330092226

Cpolar cloud settings

After completing the installation and registration of cpolar intranet penetration and building the local webpage, we can start to build an intranet penetration data tunnel and publish this webpage to the public Internet. Since the webpage needs to be able to be accessed stably, the data tunnel of the free version of cpolar is reset every 24 hours. The author does not want to reconnect settings every day, so cpolar will be upgraded to the VIP version in order to obtain a long-term stable intranet penetration data tunnel.

To establish a long-term stable data tunnel, we first log in to cpolar's official website, find the 预留button on the left side of the user's main page, and click to enter the cpolar reserved data tunnel page. A public Internet address is generated here (it can also be regarded as the entrance of the data tunnel). Since this address is not connected to the local software output port at this time, it can also be regarded as a blank data tunnel.

20230330092227

On the reservation page, you can see many kinds of data tunnels that can be reserved. Here we select 保留二级子域名the field. If you have already purchased a domain name, you can also select the "Reserve custom domain name" column, but you need to analyze your own domain name at the domain name provider before it can be used with cpolar.

20230330092228

In the field of "Reserve the second-level subdomain name", you need to make simple settings for several information

  • 地区: The area where the server is located, just select the nearest one

  • 二级域名: Will eventually appear in the generated public Internet address as one of the identifiers of the network address

  • 描述: It can be regarded as the description of this data tunnel, which can be distinguished from other tunnels)

After completing these settings, you can click the "Reserve" button on the right to reserve this data tunnel.

20230330092229

20230330092230

If this data tunnel is no longer intended to be used, you can click on the right xto delete it easily, saving valuable tunnel quota.

3.3 Cpolar Local Settings

After the second-level subdomain is reserved, we can return to the cpolar local client and connect the public Internet address generated by the cpolar cloud with the webpage created by the local IIS, so that we can open the webpage on the local computer on the public Internet.

Open and log in the cpolar client locally (you can enter localhost:9200 in the browser to access directly, or click the shortcut of the cpolar client in the start menu).

20230330092231

After logging in to the cpolar client, click the button on the left side of the main interface of the client 隧道管理to 创建隧道enter the local tunnel creation page (if you want to create a temporary data tunnel without a 24-hour reset address, you can directly set it here instead of setting it on the cpolar official website blank data tunnel).

On this page, several information settings also need to be made, including:

1. 隧道名称– It can be regarded as cpolar’s ​​local tunnel information comment, as long as it is convenient for us to distinguish; 2. 协议– We build a web page with http protocol, so we choose http protocol; 3. 本地地址– The local address is the output port number of the local website , and the port number we filled in when setting up the webpage is 8080, so fill in 8080 here; 4. 域名类型– In this example, we have reserved a data tunnel for the second-level subdomain name in the cpolar cloud, so check the " Second-level sub-domain name" (if the reserved domain name is a custom domain name, check the custom domain name), and fill in the reserved second-level sub-domain name in the "Sub Domain" column on the next line, here we fill in the reserved The second-level subdomain name "newpage" (if you just create a temporary data tunnel, you can directly check "random domain name", and the cpolar client will generate the network address by itself ) 地区; ;

After completing these settings, you can click the "Create" button below to connect the public Internet address created on the cpolar cloud with the local web page

20230330092232

After completing the data tunnel connection between the cpolar client and the cpolar cloud, the cpolar client will automatically jump to the "Tunnel List" page under the "Tunnel Management" item, where we can see the status of the data tunnel (whether it is smooth), Or control the opening, closing or deleting of the tunnel. If you need to change the information of the tunnel, you can also use the "Edit" button here

20230330092233

Public network access test

The public Internet address of the created data tunnel can be seen on the 状态-- 在线隧道列表page.

20230330092234

We copy and paste this address into the browser, and we can access the new web page created by the local IIS service through the public Internet.

20230330092235

epilogue

So far, we have successfully used the IIS service that comes with Windows to create a new web page on the local computer, and used the intranet data tunnel created by cpolar to publish it to the public Internet. Although the process of creating web pages in IIS is a bit complicated, it is a good opportunity for us to get familiar with the Windows system, and it is also a very interesting and good thing to learn new knowledge

Guess you like

Origin blog.csdn.net/qq_62464995/article/details/130140673