Article directory
Preface
Apache is the most commonly used web server software in the world, and it can run on almost all common computer platforms. Known for its excellent cross-platform and advanced security, as well as being fast, reliable and easy to extend through simple APIs, it is widely used in the field of web servers. This article mainly shares how to install and configure the Apache service in Windows systems, and combines the intranet penetration tool to achieve remote access to the local intranet Apache service from the public network.
1.Apache service installation and configuration
1.1 Enter the official website to download the installation package
First, we enter Apache’s official website download page (https://www.apachehaus.com/cgi-bin/download.plx) and download the installation package according to the required version.
It should be noted that Apache requires the VC++ redistributable package for parsing, so if VC++ is not currently installed on your computer, you need to go to the bottom of the download page, download VC++ and install it, and then install the Apache service.
After installing VC++, decompress the downloaded Apache file compression package and cut the Apache24 folder to the root directory of the system disk.
1.2 Apache service configuration
First, use the shortcut key win+R, or enter in the search box in the lower left corner of the desktopcmd
, and choose to run as administrator
entercd c:\
Re-entercd Apache24
to enter the Apache folder path
Enter againcd bin
Enter lasthttpd -k install
and press Enter
When you see successful installed shown below, you can see that Apache has been successfully installed. The firewall prompt box will pop up and select allow access.
At this time, enter thefolder in the Apache24
folderbin
Double-click to openApacheMonitor
Application
After opening, the Apache logo will be displayed in the lower right corner of the desktop. Double-click the left button to open the Apache service interface.
Click theStart
button on the right. As shown in the figure below, the chart changes from red to green, which means the service is started successfully
At this time, enterlocalhost
in the browser. When this page is displayed, the entire configuration process is successful.
2. Install cpolar intranet penetration
2.1 Register cpolar 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
2.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. Obtain the remote desktop public network address
3.1 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)
3.2 Create 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. Here the author filled in Apache-1
-
Protocol: Select http
-
Local address: 80
-
Domain name type: Choose a random domain name for free
-
Region: China Top
Click创建
Then click on in 状态
on the left. You can see that the Apache-1 tunnel you just created has generated two public network addresses. The two access methods are http and https. Just copy an address and open it in a public computer browser. As shown in the figure below, the access is successful. 在线隧道列表
4. Fixed public network address
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 be remote for a long time, it is necessary to configure a fixed address.
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 Reserve, and copy the reserved second-level subdomain name after the reservation is successful.
Taking this tutorial as an example, select China VIP for the region, fill in Apachetest for the secondary domain name, fill in ceshi for the description, and click Reserve.
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: Apache-1, click on the right编辑
Modify the tunnel information and configure the successfully reserved second-level subdomain name into the tunnel.
- Domain name type: Select a second-level subdomain name
- Sub Domain: Fill in the successfully reserved second-level subdomain name Apachetest
Click更新
After the update is completed, open the online tunnel list. 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.
Finally, we use a fixed public network address for connection access, copy http://apachetest.vip.cpolar.cn to another public network computer and open it in a browser. There are no errors or connection exceptions, and you can see that the connection is successful, like this Fixed address access is set up.
Reprinted from cpolar pole cloud article:Apache service installation and configuration and integration with intranet penetration to achieve public network access