Teach you how to build a movie website on the intranet and access it from the public network (nanny-level teaching)

Teach you how to build a movie website on the intranet and access it from the public network


insert image description here

foreword

Mr. Zhao is a program technician and a movie lover. He always spends his spare time watching movies. Because of this hobby, Mr. Zhao has won a lot of friends. Over time, Mr. Zhao came up with the idea of ​​building a movie website by himself, and he did it. After searching the Internet, Mr. Zhao decided to use the Cpolar+MacCMS10 solution to build his own movie website, which is not only convenient for his usual movie viewing needs, but also Can share with friends.

1. Install the software on the local computer separately

First of all, you need to download all the software used by the movie website and install them on your local computer. Among them, cpolar and PHPStudy are independent software, which can be installed by double-clicking the installer. And maccms10 is a webpage program, which requires the webpage operating environment built by PHPStudy to be installed.

1.1 Open the PHPStudy software and install a series of supporting software required by movie websites

Next, open the "Software Management" page of the PHPStudy software on the main interface, and install a series of supporting software required by the movie website, including php, Nginx, MySQL, SQL-front, FileZilla, etc. After the supporting software is installed, you can officially enter MacCMS10 operating environment settings.

1.2 Setting up the operating environment of MacCNS10

The operating environment settings of MacCMS10 are not complicated, mainly including "domain name", "port", "root directory (that is, the location where MacCMS10 webpage files are stored)", "create FTP" and "create database". Among them, when creating a database, it is necessary to properly save the database name, user name and password, so that they can be input during the subsequent installation of MacCMS10. After completing the settings, you can click "Confirm" at the bottom of the page to save the configuration of the webpage running environment.

1.3 Enter the installer of the movie web page

Finally, open MacCMS10 through the newly created webpage operating environment, and officially enter the installation program of the movie webpage.

1.4 Detect the operating environment

During the installation process, MacCMS10 will first detect the operating environment, and only when all the required supporting programs have been installed, will it enter the main setting of the next movie web page, including database configuration and administrator settings.

1.5 After the installation is complete, set the appearance and content of the website, etc.

After the installation of MacCMS10 is completed, it will automatically switch to the background administrator login interface, where the administrator can configure the appearance of the movie website, the source of the movie (available from external sites or local upload), website logo and other content.

At this point, the movie website is installed. The next thing to do is to publish the movie website to the public Internet through the intranet data tunnel created by cpolar, so that friends and colleagues can access it.

2. Use the data tunnel generated by cpolar to penetrate the intranet

We have installed the MacCMS10 movie website on the local computer, but at this time the movie website can only be accessed within the LAN at most. In order to make this movie website accessible on the public Internet, it is necessary to use the data tunnel generated by cpolar to penetrate the intranet.

2.1 Configure the cpolar data tunnel

First log in to the official website of cpolar, find the "Reserve" button on the "Dashboard" interface, click to enter the reservation page, and set the data tunnel to be reserved in the "Reserve second-level subdomain name" column. The first is "Region". Since the movie website consumes a lot of bandwidth and traffic, it is necessary to choose a server China NAS with higher bandwidth support; "Second-level domain name" can enter the content you like, but because the content will eventually be displayed in the website address characters Therefore, the content should be filled in carefully; the last "description" can be regarded as the description of the tunnel. After filling in these 3 fields, immediately click the "Save" button on the right to save the configuration of the data tunnel.

2.2 Associate the blank tunnel with the local MacCMS10 movie web page

After the blank data tunnel in the cpolar cloud is saved, you can switch back to the cpolar client on the local computer and associate the blank data tunnel with the local MacCMS10 movie web page. On the left side of the cpolar main interface, click the "Create Tunnel" button under the "Tunnel Management" item to enter the tunnel creation page. On this page, you can associate the high-bandwidth blank data tunnel reserved in the cpolar cloud with the local movie webpage through relevant settings. These settings include "Tunnel Name", "Protocol", "Local Address", "Domain Type (Sub Domain)" and "Region". After setting these items, you can click the "Create" button at the bottom of the page to create a A data tunnel connecting local movie websites with the public Internet.

The address of the local MacCMS10 movie website in the public Internet can be found in the "Online Tunnel List" under the "Status" item.

So far, a movie website has been successfully built locally and released to the public Internet. And cpolar also supports "custom domain name" and "https" protocol setting function, which makes the URL of this movie website more recognizable, so that this website can be used in business (if you are interested in setting a custom domain name for the website. And use The release of personal movie websites by cpolar is only an application scenario of the intranet penetration function of cpolar, and the data tunnel created by cpolar can also be applied in more scenarios.

3. Different problems encountered in different installation environments

Even if it is the same software, it will encounter different problems in different installation environments, and the same is true for MacCMS10. In some cases, when you log in to the background of MacCMS10, "Verification Code Error" will appear. Even if you enter the displayed verification code, the webpage will still prompt "Verification Code Error", which makes it impossible to enter the MacCMS10 background. And there are two ways to solve this troublesome problem.

3.1 Turn off the verification code function under the MacCMS10 folder

The first method is to find the application folder under the MacCMS10 folder, open the extra folder in it, use the command line editing software to open the "maccms.php" file in it, find "'admin_login_verify' => '1'", and set Change "'1'" to "'0'" to turn off the verification code function.

3.2 Change the configuration of php.ini

If this method still fails to solve the login problem (usually when the correct user name and password are entered, the page jumps back to the login interface, and the user name and password are cleared), you need to change the configuration of php.ini. And php.ini is under the php folder used by MacCMS10. For example, the author uses php7.4.3nts to run MacCMS10, so the php.ini file is in the php -> php7.4.3nts folder under the Extensions folder in phpsudy.

3.3 Open the file with Notepad

Then use the "Notepad" that comes with the system to open the file, and find the "session.save_path" command from the type. There are multiple commands. What we are looking for is the command with the file path and tmp. The missing tmp folder of the MacCMS10 causes MacCMS10 to be unable to cache the input verification code, account number and password, and cannot log in to the background of MacCMS10. Therefore, we need to rebuild a tmp folder according to the path in the command, and grant it the permission to modify and read the scent, in order to completely solve this problem.

Therefore, we create a new folder according to the path shown in php. On the tab page that appears, check "Full Control", and finally click "OK" under the tab to save the configuration.

After completing the modification of the tmp folder, we log in to the background of MacCMS10 again, and we will find that we can log in to the background interface of MacCMS10 normally.

In the background of S10, you will find that you can log in to the background interface of MacCMS10 normally.

[External link image transfer...(img-GHMb9zjy-1691992464939)]

[External link image transfer...(img-mPl7eLgS-1691992464939)]

Reprinted from the cpolar cloud article: [Build a movie website on the intranet and realize public network access] ( Build a movie website on the intranet and realize public network access-cpolar pole cloud )

Guess you like

Origin blog.csdn.net/weixin_74937672/article/details/132274501