Local computer as a server to build a private music website ThinkMusic + cpolar intranet penetration

Reposted from CSDN lisacpolar's article: ThinkMusic source code builds a music website and realizes public network access

1 Introduction

In our daily life, music has become one of the indispensable elements. Listening to a few favorite pieces of music can make the bad mood better. Although it is very convenient to use computers or mobile electronic devices to listen to music, it is inevitable to be restricted by many members or VIPs, which inevitably reminds us of the era when music websites bloomed everywhere. Today, we will introduce to you how to build a ThinkMusic music website with a good style and interface on the local computer, and publish it to the public Internet through the intranet penetration data tunnel created by cpolar, so that we can upload our favorite Music is shared with everyone, just to no longer be controlled by others.

2. Local webpage construction

2.1 Environmental use

Now the most commonly used system on personal computers is Windows system, so you can use the software PHPStudy as the virtual operating environment of the ThinkMusic music website (the download address of PHPStudy is https://www.xp.cn/download.html ) .

Chart 1

2.2 Support build selection

The ThinkMusic music website is developed based on the php framework, which can provide music uploading and sharing. Its operating environment components include Nginx, php, MySQL, SQL-Front, and FileZilla. And PHPStudy also supports the direct installation and setting of these software.

Chart 2

3. Web installation

After PHPStudy has installed all the software required by the webpage, you can officially enter the installation of the ThinkMusic webpage. Since the ThinkMusic website is open source, downloads for its source code can be easily found.

Chart 3

After downloading the source code of the website, you can directly unzip it to the web page folder of PHPStudy (that is, in the WWW folder).

Chart 4

Then, on the "Website" page of PHPStudy, find the "Create Website" button in the upper left corner and click it to set up the operating environment required by the ThinkMusic music website, including the following items

  • 域名– That is, the domain name of the local access website;
  • 端口– That is, the output port number of the local ThinkMusic website;
  • 根目录- It is the storage path of the ThinkMusic website files. If you can’t remember the detailed path, you can select the storage location of the website files through the “Browse” button on the right side of the field, and the path will be automatically generated;
  • 创建FTP和数据库- After checking these two items, PHPStudy will pop up a new window to set up the FTP and database respectively. The setting contents are mainly user name, password, and name;
  • PHP版本- Usually this item does not need to be selected separately, but in order to prevent self-test errors during website installation, it is best to choose 5.2 (5.X series) or a higher version of the same series.

Chart 5

Chart 6

Chart 7

After all the settings are completed, you can click 确认the button at the bottom of the page to generate the operating environment of the ThinkMusic website. If there are any changes to the operating environment of the website later, you can also click the "Manage" button on the right side of the entry and modify it in the drop-down menu.

Chart 8

Then we enter in the address bar of the browser localhost:86/install(the output port was set to port 86 when setting the ThinkMusic website before, so enter 86 here. If there is a difference when setting the output port of the website, you should enter the actual port number) to execute the website installation program, You can enter the installation interface of the ThinkMusic music website.

Chart 9

The next step is the general settings, where two parts need to be modified, the first part is the database name, database user name and password, we only need to enter the user name and password set when PHPStudy set up the database; the second part is the webmaster of ThinkMusic Information settings, we only need to fill in the facts.

Chart 10

After completing the necessary information modification and setting, you can click "Submit" at the bottom of the installation page to complete the installation of the ThinkMusic music website. At this time, the website will prompt us whether to enter the foreground or the background. The foreground is the website that visitors can see, and the background is the interface for us to set up the website.

Chart 11

At this time, you can enter localhost:86 (your own port number) in the browser address bar to log in to the front page of the local website for functional testing, or enter localhost:86/admin to log in to the background of the website for management.

Chart 12

Chart 13

All registered users can upload their favorite songs to share with others, or create favorite music albums.

Chart 14

3. Local web publishing

Now, the local ThinkMusic music website is ready, the next thing to do is to publish this local website to the public Internet through the intranet penetration data tunnel created by cpolar. Cpolar supports three web tunnel modes, which are

  • 临时数据隧道- Free trial, 24-hour reset tunnel number, suitable for temporary test scenarios;
  • 固定二级子域名– It is optional for users of the basic version and above, and can customize the second-level subdomain name. Once the data tunnel is fixed, it will not change, and supports the https protocol, which is suitable for small-scale web publishing scenarios that do not require high domain names.
  • 自定义域名– Professional version and above are optional, can use specific domain names purchased from domain name providers, and support users to upload website key and certificate files by themselves, which is very suitable for a wide range of application scenarios such as commercial promotion.

In order to better explain how to use cpolar, we will use a fixed second-level subdomain name tunnel as a demonstration. First of all, we need to log in to the cpolar official website (the official website address is https://www.cpolar.com ), and download the cpolar client.

insert image description here

3.1 Cpolar cloud settings

First, log in to the official website of cpolar, find the "Reserved" item on the left side of the "Dashboard" page, and 预留select 保留二级子域名the column on the page and set up a few simple information for the tunnel. The information is:

  • 地区- Here we can choose the actual place of use in the drop-down menu;
  • 二级域名- You can choose the content you like to fill in the second-level domain name, but it should be noted that the content will eventually be displayed in the public URL, so you need to choose the appropriate content to fill in;
  • 描述– This column can be regarded as the remarks of this data tunnel, as long as it is convenient to distinguish;

Chart 16

After filling in these three items of information, click the button on the right 保留to create a fixed second-level subdomain name tunnel.

Chart 17

Here, we set up a blank data tunnel on the cpolar cloud, then we go back to the local computer, install the cpolar client software, and associate the blank second-level subdomain data tunnel on the cpolar cloud with the local ThinkMusic website.

3.2 Cpolar Local Settings

After the Cpolar client is downloaded, you can directly decompress and double-click the .msi installation file to install it.

Chart 18

Then just "next" all the way to complete the installation.

Chart 19

Then we open the client of cpolar on the local computer (you can enter localhost:9200 in the browser to open the Web-UI interface of cpolar, or you can find the shortcut of cpolar in the start menu)

Chart 20

Chart 21

On the cpolar local side, we select the "Create Tunnel" item under the "Tunnel Management" item to enter the "Create Tunnel" page. On this page, we need to fill in several basic information to create a data tunnel, including:

  • 隧道名称– It can be regarded as the local tunnel information comment of cpolar, as long as it is convenient to distinguish;
  • 协议– Here we choose the http protocol by default;
  • 本地地址– The local address is the output port number of the music website, which is 86 in this example;
  • 域名类型– Since we have reserved a fixed tunnel for the second-level subdomain name in the cpolar cloud, check the "Second-level subdomain name" (if the reserved domain name is a custom domain name, check the custom domain name), and in the next line "Sub Fill in the reserved second-level subdomain name in the Domain” column, in this example, it is “thinkmusic”;
  • 地区– It is the same as the information reserved in the cpolar cloud, we can fill it in according to the actual use;

After filling in the information, you can click 创建the button at the bottom of the page to generate a public address that can publish local music websites.

Chart 22

Chart 23

4. Public network access test

Finally, we can find the public Internet address of the thinkmusic music website 状态in 在线隧道列表, and enter the public Internet address into the browser to successfully access the thinkmusic music website on the local computer.

Chart 24

Chart 25

insert image description here

It can be seen that using the internal network penetration data tunnel generated by cpolar, you can easily publish the ThinkMusic music website on the local computer to the public Internet. It can be used as a personal original music publishing platform, and it can also gather all music lovers. Share your understanding of music. The most important thing is that you can stop watching other people's faces and listen to music, and create your own music paradise.

5 Conclusion

Using cpolar to publish personal music websites is just one application scenario of cpolar's intranet penetration function. The intranet penetration data tunnel created by cpolar can also be applied in more scenarios. If you have any questions about the use of cpolar, please contact us, we will provide you with assistance within our ability. Of course, you are also welcome to join the VIP official group of cpolar to explore the unlimited potential of cpolar together.

Guess you like

Origin blog.csdn.net/weixin_68773927/article/details/130764944