Linux pagoda panel builds Discuz forum, and remote access from public network [intranet penetration]

Article directory

        • foreword
        • 1. Install the basic environment
        • 2. One-click deployment of Discuz
        • 3. Install the cpolar tool
        • 4. Configure domain name to access Discuz
        • 5. Fixed domain name public network address
        • 6. Configure the Discuz forum

Foreword

Crossday Discuz! Board (hereinafter referred to as Discuz!) is a general-purpose community forum software system. Users can build a fully functional and powerful load forum on the Internet through simple settings and installations without any programming. Capable and highly customizable forum services.

Next, we use the pagoda panel + Discuz + cpolar intranet penetration tools on Linux to build a set of forum services published to the Internet environment, without the need for a public network IP server or router.

1. Install the basic environment

Install the PHP version, because Discuz supports the highest PHP7.4 version environment, we install PHP7.0 version in the panel, search for PHP, you can see it, and then click Install

image-20230315114812470

Install a database, if it is already installed, you can skip it, click the database on the panel, click Install

image-20230314180023904

Then modify the database password and change it to a password that you can remember. The user name is root

image-20230314180357402

2. One-click deployment of Discuz

Search for the keyword Discuz in the panel, and then click one-click deployment

image-20230315132925646

Set parameters, domain name set the local domain name 127.0.0.1, the port number can be customized, then set the database account password, database user name and password set by yourself, click submit, and then wait for the download to complete

image-20230315141442776

Then we click on the website in the panel to see the site we just deployed,

image-20230315140745617

Next open a port in the panel: 8089

image-20230315141732450

Open the browser, use the Linux LAN ip + :8090 (the port number set above) to access, and the installation wizard interface will appear to indicate success

image-20230315141848464

3. Install the cpolar tool

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

Open the pagoda terminal command window and use cpolar to install the script:

curl -L https://www.cpolar.com/static/downloads/install-release-cpolar.sh | sudo bash

image-20230303183721806

token authentication

Log in to the cpolar official website, click Verify on the left to view your authentication token, and then paste the token in the command line

cpolar authtoken xxxxxxx

20230111103532

Add a service to the system

sudo systemctl enable cpolar

Start the cpolar service

sudo systemctl start cpolar

Select security in the pagoda panel. Then open port 9200

image-20230303184430176

Then the data Linux LAN ip +: 9200 port will appear cpolar management interface

image-20230303184618711

Enter the account registered on the official website to log in to operate the tunnel.

image-20230303184844558

4. Configure domain name to access Discuz

We create a random 8089 tunnel in the cpolar management interface:

  • Tunnel name: customizable, be careful not to repeat
  • protocol: http
  • Local address: 8089
  • Port type: random domain name
  • Region: China VIP

click create

image-20230315144256453

Then open the online tunnel list, view the public address of the created tunnel, and copy the address

image-20230315144916839

Open the browser and use the above public network address to visit. Since the welcome page appears, it means success

image-20230315144954997

5. Fixed domain name public network address

You need to upgrade to the basic package or above to support the configuration of fixed domain names

Log in to the background of the cpolar official website, click Reserved on the left dashboard, find Reserve the second-level subdomain name, and reserve a second-level subdomain name for the http tunnel.

  • Region: select server region
  • Name: Fill in the second-level subdomain name you want to reserve (customizable)
  • Description: Remarks, which can be customized

image-20230315150417685

In this example, a second-level subdomain named DiscuzTest is reserved. After the subdomain name is successfully reserved, we copy the subdomain name, and then we need to bind its configuration to the tunnel.

image-20230315150447911

Log in to the cpolar web ui management interface. Click Tunnel Management on the left dashboard–Tunnel List, find the tunnel that needs to be configured with a second-level subdomain name (in this case, the Discuz tunnel), and click < on the right code>Edit

image-20230315145802386

Modify the tunnel information and configure the second-level subdomain name into the tunnel:

  • Domain name type: choose secondary subdomain name instead
  • Sub Domain: Fill in the second-level subdomain we just reserved (in this case typechoTest)

After modification, click Update

image-20230315150653173

After the tunnel is successfully updated, click Status on the left dashboard–Online Tunnel List, and you can see that the public network address of the DiscuzTest tunnel has been updated to a second-level subdomain , copy the public network address.

image-20230315150728034

Open the browser, let’s test the access to the successfully configured second-level sub-domain name, the installation wizard interface appears to indicate success, and can be accessed normally. Now, our only private second-level subdomain name in the entire network has been created.

image-20230315151503791

6. Configure Discuz Forum

After clicking I agree, a prompt message appears saying that the version is too old, cancel to continue the installation

image-20230315151647274

click next

image-20230315151742613

Choose clean install

image-20230315151912495

Then you need to configure the database, we fill in the database root user name and root password, then set the administrator password, click Next

image-20230315152402908

Then the installation is complete, click to visit

image-20230315152500793

Then we have built the Discuz forum, and combined with the public network domain name address mapped by cpolar, it can be accessed remotely without being restricted by the local area network

image-20230315152701056
Then the installation is complete, click to visit

image-20230315152500793

Then we have built the Discuz forum, and combined with the public network domain name address mapped by cpolar, it can be accessed remotely without being restricted by the local area network

image-20230315152701056