Typecho blog construction +cpolar intranet penetration enables public network access to intranet sites

Preface

Typecho is an open source blog program written in PHP language. It is a lightweight content management system focusing on the blog field. Supports multi-user, multi-site, multi-language and other functions to meet the needs of different users.

At the same time, Typecho also has rich plug-in and template resources, which users can freely select and configure according to their own needs.

The installation of Typecho is very simple. Users only need to upload the Typecho installation package to their own server, and then access the corresponding URL through the browser to install it.

The cpolar intranet penetration tool mainly forwards local ports to the public network environment. Through this tool, we can easily forward local services to the public network.

The following describes how to build a typecho blog + cpolar intranet penetration tool in the windwos system to publish the blog to the public network environment so that it can be accessed and operated remotely.

1. Environment installation

Typecho blog is written in PHP language. To run it, you need to install a series of environments, such as PHP, database and running web containers. In order to facilitate the establishment of those environments, we use a third-party tool XAMPP, which integrates the tool environment we need. , you can install it with one click, reducing the tedious configuration. This is the download address: https://www.apachefriends.org/ , we choose the windwos version to install.

image-20230324105521061

Just click next during installation. The installation path can be customized. After installation, we open it and click on the interface to start the apache test:

image-20230324142239632

After starting the service, enter localhost:80 in the browser, you can see the welcome page of Apache, and then stop Apache

image-20230324142304127

2.Install Typecho

Enter Typecho official website to download,

image-20230323151443954

After downloading, we find a folder called htdocs. This folder is the web access directory of apache. Click Explorer on the right side of XAMPP

image-20230324142559609

Then find the htdocs folder

image-20230324142720598

First delete all the files in htdocs, and then extract the Typecho compressed package to the htdocs folder.

image-20230324142858480

Then we started apache again, entered localhost:80 in the browser, and automatically jumped to the typecho page.

image-20230324143027486

3. Install cpolar intranet penetration

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

Visit the cpolar official website, register an account, and then download and install the client. For specific installation instructions, please refer to the official website documentation tutorial.

  • Windows system: After downloading the installation package from the official website, double-click the installation package and install it by default.
  • Linux system: supports one-click automatic installation script. For details, please refer to the official website documentation - Getting Started Guide

20230130105715

After cpolar is successfully installed, access the local 9200 port [ http://localhost:9200 ] on the browser and log in using the cpolar account.

20230130105810

Click Tunnel Management - Create Tunnel on the left dashboard to create a port 80 http tunnel, which is the port of Apache

  • Tunnel name: You can customize the name. Be careful not to duplicate the existing tunnel name.
  • Protocol: Select http
  • Local address: 80
  • Domain name type: Choose a random domain name for free
  • Region: Select China vip

Click创建

image-20230324144017545

After the tunnel is successfully created, click Status on the left - Online Tunnel List, view the generated public network address, and then copy the address

image-20230324144047261

Open the browser and use the public address above for remote access. You will see the typecho blog welcome page. At this time, you can use the public address for remote access.

image-20230324144153374

4. Fixed public network address

Since the tunnel created using cpolar above uses a random public network address, it will change randomly within 24 hours, which is not conducive to long-term remote access. 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.

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.

image-20230324144519095

After the reservation is successful, copy the reserved second-level subdomain name address

image-20230324144553685

Visit http://127.0.0.1:9200/, log in to the cpolar web UI management interface, click Tunnel Management - Tunnel List on the left dashboard, find the port 80 tunnel to be configured, and click Edit on the right

image-20230324144621225

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

Click更新

image-20230324144704784

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 the reserved second-level subdomain name. Copy it.

image-20230324144934391

Then use the fixed https address to open the browser for access. The access is also successful and the domain name will not change. Then typecho continues to configure the following.

image-20230324144958466

5. Placement Typecho

Click Start to next step, and then the database configuration will appear.

image-20230324145214179

Start the database in XAMPP

image-20230324150333142

After startup, click Admin to enter the database management interface

image-20230324151450974

Then we add a database named "typecho"

image-20230324152919471

After creation, we open the typecho database setting page and fill in the parameters. Since it is a local database and there is no password set, we do not need to fill in the password. After filling it in, we confirm and start the installation.

image-20230324153133053

Then, when you get to the page to set the username and password, there is also an email address. After setting it up, click to continue the installation.

image-20230324153418156

The installation is successful. The login user name and password are displayed on the page, then click on the words below the user name and password to access the control panel.

image-20230324153542071

After the configuration is completed, you can happily write articles and support remote access.

image-20230324153725747

The installation is successful. The login user name and password are displayed on the page, then click on the words below the user name and password to access the control panel.


After the configuration is completed, you can happily write articles and support remote access.

Reprinted from cpolar pole cloud article: Windows builds Typecho personal blog and publishes public network access [intranet penetration]

Guess you like

Origin blog.csdn.net/weixin_43786143/article/details/133138821