How to build WampServer locally and combine it with cpolar intranet penetration to achieve remote access

Preface

Wamp is an integrated installation environment under Windows system Apache + PHP + Mysql. It is a set of open source software commonly used to build dynamic websites or servers. It has simple graphics and menu installation and configuration. The environment is loved by the majority of users. This tutorial will share with you how to install WampServer and use the cpolar intranet penetration tool to achieve public network access to the WampServer service on the intranet.

1.WampServer download and installation

First click to enter the sourceforge official website,download the installation program.

1694590901116

After downloading the installer, double-click to open it to install.

1694591834927

After selecting I accept on the installation interface, click all the wayNextNext to install by default.

1694592073383

1694592244478

At the end of the installation, the window shown below will pop up, click

image-20230913160736071

Click After , a window will pop up, click打开

image-20230913160907587

Then, another window will pop up, as shown below:

1694592656636

Select as well, then click on the pop-up window打开

1694592757830

The installation will then continue until the following window pops up, clickNext

1694592864862

ClickFinishto complete the installation of WampServer

1694593043287

2.WampServer starts

Once the installation is complete, click on the WampServer shortcut on your desktop.

1694593359859

The program will automatically configure and display the progress bar as shown below, just wait.

1694593242431

After the progress bar runs out, a WampServer program icon will appear in the lower right corner of the desktop, as shown below. If the icon is green, it means the startup is successful!

1694593602902

Now, open the browser and enter localhost When the following interface is displayed, it means that WampServer is running normally!

1694593686754

3. Install cpolar intranet penetration

At this time, WampServer has been successfully logged in and running, but it can only be accessed locally. If we plan to access the Wamp service on the intranet at any time in the public network environment, we need to install the cpolar intranet penetration tool to achieve this.

3.1 Register an account

Enter cpolar official website: https://www.cpolar.com/

Click免费注册 in the upper right corner, use your email to register a cpolar account for free and log in

20221117173301

3.2 Download cpolar client

After successfully logging in, click to download cpolar locally and install it (you can install it by default all the way). In this tutorial, you choose to download the Windows version.

20221117173307

3.3 Log in to the cpolar web ui management interface

Access on the browser127.0.0.1:9200, use the registered cpolar email account to log in to the cpolar web ui management interface (default is Local port 9200)

20221117173316

3.4 Create a public network address

After successfully logging in and entering the main interface, we click on the left dashboard 隧道管理——隧道列表, and then click 创建隧道.

1694594083588

  • Tunnel name: The name can be customized and cannot be repeated with the existing tunnel name. I filled it in here.wamp

  • Protocol: Selecthttp

  • Local address:80

  • Domain name type: Free package selection随机域名

  • area:China Top

Click创建

image-20230913163639600

At this time, click on in 状态 on the left. You can see the wamp tunnel you just created and two public network addresses are generated. There are two access methods, namely http and https. Just copy an address and open it in a public network computer browser. As shown in the figure below, it means that the public network can successfully access the WampServer of the local intranet. 在线隧道列表

image-20230913163856162

4. Fixed public network address access

It should be noted that this tutorial uses a random temporary address on the public network generated by free cpolar. This address will change within 24 hours. For users who need to use WampServer outside for a long time, configuring a fixed address is very useful. necessary.

Therefore, we can configure a second-level subdomain name for it. This address is a fixed address and will not change randomly [ps: cpolar.cn has been filed]

Note that you need to upgrade the cpolar package to a basic package or above, and the bandwidth corresponding to each package is different. [cpolar.cn has been registered]

Log in to the cpolar official website, click Reserve on the left, select to reserve the second-level subdomain name, set a second-level subdomain name, click保留, and copy the reserved second-level subdomain name after the reservation is successful. Subdomain name.

image-20230913164145706

Take this tutorial as an example. Select the regionChina VIP, fill in the second-level domain namewamptest, fill in test in the description, and click保留.

image-20230913164244740

After the reservation is successful, copy the reserved second-level subdomain address, log in to the cpolar web UI management interface, and click 隧道管理——隧道列表 on the left dashboard , find the tunnel you want to configure: wamp, click on the right编辑

image-20230913164455003

Modify the tunnel information and configure the successfully reserved second-level subdomain name into the tunnel.

  • Domain name type: Select二级子域名
  • Sub Domain: Fill in the successfully reserved second-level subdomain namewamptest
  • Region: SelectChina VIP

Click更新

1694594786598

After the update is completed, open在线隧道列表. At this time, you can see that the public network address has changed and the address name has become a reserved and fixed second-level subdomain name.

1694594925102

Finally, we use a fixed public network address for connection access, copy the second-level subdomain name: http://wamptest.vip.cpolar.cn/ and open it in the browser of another public network computer. There is no error or connection exception. You can see Once the connection is successful, a fixed address access will be set up. You can use this domain name to access the intranet WampServer from the public network anytime and anywhere.

image-20230913164941737

Guess you like

Origin blog.csdn.net/Tiam_cr/article/details/134970738