Article directory
Preface
WNMP is a green Nginx+Mysql+PHP environment integration package under Windows system. After the installation is completed, you will get an Nginx + MySQL + PHP environment, which is often used to build dynamic websites or servers. Discuz!, PHPWind, DeDeCMS, WordPress and other programs can be installed directly. It is an efficient solution for building a PHP website under Windows. This tutorial mainly introduces how to download and install Wnmp and combine it with the cpolar intranet penetration tool to achieve Wnmp service from the external network to the internal network.
1.Wnmp download and install
First log in to the Wnmp official website to download the installation program, click here to download.
After downloading the installer, double-click to open it.
After selecting I accept on the installation interface, click Next
Next to install by default.
Click Finish
to finish installing Wnmp
2.Wnmp settings
In the previous step, Finish
after clicking, the Wnmp control interface will automatically open.
First, set a password in the pop-up window. Check the box next to see if the password is visible. Enter the password and clickSetup
Then click the button at the top on the right Start All
. Running
If all green checkmarks are displayed on the lower left side, the startup is successful.
If a firewall prompt appears during startup, click Confirm.
After all green check marks are displayed, open the browser and press localhost
Enter. When the following interface is displayed, the Wnmp service is running normally!
3. Install cpolar intranet penetration
At this point Wnmp has been successfully logged in and running, but it can only be accessed locally. If we plan to access the Wnmp service on the intranet at any time in the public network environment, we need to install cpolar intranet penetration to achieve this.
3.1 Register an account
Enter cpolar official website: https://www.cpolar.com/
Click on the upper right corner 免费注册
, use your email to register a cpolar account for free and log in
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.
3.3 Log in to the cpolar web ui management interface
Access 127.0.0.1:9200 on the browser and use the registered cpolar email account to log in to the cpolar web ui management interface (default is local port 9200)
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 创建隧道
.
-
Tunnel name: The name can be customized and cannot be repeated with the existing tunnel name. I filled it in here.
wnmp
-
Protocol: Select
http
-
Local address:
80
-
Domain name type: Free package selection
随机域名
-
area:
China Top
Click创建
At this time, click on the left 状态
, 在线隧道列表
you can see the wnmp tunnel you just created. Two public network addresses are generated. There are two access methods, namely http and https. Copy an address at will and open it in a public network computer browser. That’s it. As shown in the figure below, it means that the public network has successfully accessed the local intranet wnmp service.
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 Wnmp services outside for a long time, it is very easy to configure a fixed address. Is 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.
Take this tutorial as an example, select the region China VIP
, fill in the second-level domain name wnmptest
, fill in the description test, and click 保留
.
隧道管理
After the reservation is successful, copy the reserved second-level subdomain address, log in to the cpolar web UI management interface, click - on the left dashboard 隧道列表
, find the tunnel to be configured: wnmp, and click on the right编辑
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 name
wnmptest
Click更新
After the update is completed, open it 在线隧道列表
. At this time, you can see that the public network address has changed, and the address name has also become a reserved and fixed second-level subdomain name.
Finally, we use a fixed public network address for connection access, copy http://wnmptest.vip.cpolar.cn to another public network computer and open it in a browser. There are no errors or connection exceptions. You can see that the connection is successful, like this The fixed address access is set up. You can use this domain name to access the intranet wnmp service from the public network anytime and anywhere.
Reprinted from cpolar pole cloud article: How to install Wnmp and combine it with intranet penetration to achieve external network access to intranet Wnmp service