[Server] Build a website at zero cost and achieve public network access through intranet penetration

Build a website at zero cost and achieve public network access through intranet penetration

In the eyes of ordinary computer users, building one's own website is always a lofty thing. This website can not only become a platform to display oneself, but also a carrier of business. In the past, building a decent website required not only solid programming knowledge as a foundation, but also sufficient funds to rent a server. But with the rapid development of software technology, everyone can build a decent and their own website at a very low cost. Today, we will introduce to you how to use cpolar to build your own website at the lowest cost.

Among ordinary users, the Windows system is undoubtedly the most widely used, so we take the Windows system as an example to introduce how to use your own computer to play the role of a web server, and use the intranet data tunnel created by cpolar to easily publish the web pages on the local computer to the public Internet.

In order for our webpage to run normally, we need to install several necessary software for website operation and publishing. These software are:

  • PHPStudy
  • WordPress
  • Cpolar

Among them, PHPStudy is the integration of the webpage operating environment; WordPress is the creation and editing software of the webpage itself; and cpolar can publish the webpage running on the local computer to the public Internet, so that public Internet visitors can easily access it.

First of all, we install PHPStudy. After the software download is complete, click the downloaded file to install it automatically.

img

After the installation is complete, open the main interface of the phpstudy software, find the "software management" option, and install several webpage operating environment software, including MySQL, Nginx, php, and SQL-Front.

img

img

After the installation of these software is complete, you can continue to install wordpress. Since wordpress is a series of webpage running programs, there is no self-running program installed directly. We only need to decompress wordpress and copy all files to the webpage folder of phpstudy.

img

img

Chart 103

img

At this point, the wordpress web page has a running environment, which can be installed and run on the local computer. We only need to open the wordpress folder through phpstudy to enter the wordpress web page installation program.

img

img

img

img

Like other software, the installation procedure of wordpress is also very simple. Just fill in the corresponding information (such as database password, wordpress account password, etc.) according to the prompts to complete the installation, and directly enter the webpage editing and setting interface.

img

Here, we can edit the appearance of the webpage. Just find "Appearance" on the left side of the WordPress main interface and click it to enter the setting page of the webpage appearance. We can find our favorite styles on this page and apply them to the local website.

img

img

Although the appearance of our website has been determined, in order to make our website accessible to users of the public Internet, we need to install a plug-in and make small modifications to the wordpress configuration file.

First of all, we need to install a relative URL plug-in, here we choose the relative URL plug-in. We directly find the "Plugin" button on the left side of the panel, click "Add Plugin" to enter the plugin page, then search for the relative URL and click Install.

img

Then we find the wp-cofing file in the web page folder and edit it (here we use VS code software to open it), and insert two lines of commands at the position shown in the figure below. Since the program file is sensitive to the full-width and half-width of the input characters, it is best to directly copy and paste to the corresponding position. The commands that need to be inserted are as follows:

define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST']);
define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST']);

img

img

After completing these steps, the webpage we used to publish is basically formed. The next step is to install cpolar, and use cpolar to build an intranet penetration data tunnel to publish the webpage we made to the public Internet. The installation of Cpolar is also very simple, just double-click the downloaded installation file.

img

img

After the installation of Cpolar is completed, we can find the shortcut of Web-UI of cpolar from the start menu, or directly enter localhost:9200 in the address bar of the browser to open it directly. After entering each user's unique account number and password, you can start to create a dedicated data tunnel. It should be noted that here we need to set basic information such as the tunnel name (the name of the data tunnel), the local address (the web page output port, port 8081 in this example), the domain name type (VIP users can choose a fixed second-level sub-domain name or a custom domain name to obtain a long-term stable data tunnel), and the region of use, so as to create a data tunnel that belongs to them.

img

After the data tunnel is set up, you can click the "Create" button at the bottom of the page to establish a data tunnel that can penetrate the intranet. The entrance of the data tunnel (that is, the public Internet address of the local website) can be seen in the "Online Tunnel List" under the "Status" item. As long as we pass this address, we can access the website of this computer on the public Internet, and we have truly built a decent website at the lowest cost.

img

img

After the above introduction, I believe you can see that it is not difficult to create a decent website on your own computer through the cooperation of cpolar and several software, and we can also make our website have a special domain name address through further settings, and make it a safe website that is recognized by the current network environment. If you are interested in more detailed ways to use cpolar, you can refer to our series of articles "Using cpolar to build a commercial website". Of course, publishing local websites is only one aspect of the application of cpolar data tunnel. As a powerful intranet penetration tool software, cpolar can also play an important role in many scenarios.

Guess you like

Origin blog.csdn.net/qq_54796785/article/details/131830535