Use virtual server technology to build official website web server

      The company previously purchased Alibaba Cloud server as the official website server, but due to cost considerations, the boss proposed the need to build an intranet server as the official website web server.

After some attempts and efforts, the server of the intranet is finally mapped to the Internet through the virtual server function of the router, so as to realize the opening of the official website web server to the outside world. The specific implementation process is as follows:

1. Create a new virtual machine (centos 6.8), and the server IP is 192.168.0.173 (intranet);

2. Log in to the router management interface, enter Transmission Control-->Virtual Server, add a new rule list, and correctly input the external and internal ports, the mapping relationship between internal IP and external network IP, etc.

ps: The picture below is my operation interface, but the actual access path of the virtual server will be a little different depending on the router manufacturer and version. You can download it by yourself.

 

3. Use Alibaba Cloud's cloud DNS function to redirect the company's official website domain name to the external IP corresponding to the router.

 

4. Install the appache server on the virtual machine, deploy the official webpage code, modify the httpd.conf configuration file, and map different domain names to different root directories.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324821656&siteId=291194637