Yesterday, I shared the "Linux VPs centos installation lnmp system environment tutorial" with some friends. Some friends said that there have been similar tutorials on the Internet, and you may release some unnecessary ones. I think it is still necessary for me to learn and use it by myself. I can take notes when recording my own use so that I can use it directly next time. Besides, others are others after all, you still need to sort it out. Just like the series of lnmp tutorials I have organized from now on, I will record the entire process of using lnmp from this article to the final maintenance and upgrade. I believe that this accumulation will also provide a good reference for new users like me in the future. What do you think?
Today, after I installed the basic tutorial yesterday, I added the site we needed to create a website. Although we added a domain name when adding a primary domain name yesterday, it is far from enough. We need to add different domain names to build multiple websites, today, we will share how to add multiple domain names to create a website in VPS, which is also based on lnmp.
Step 1: log on to our VPs and add the following command to the VM;
/Root/vhost. Sh
Step 2: When you see the interface shown in the figure, you need to note that we enter WWW and do not enter WWW to represent different Directory domain names, so I suggest you use whatever domain name, some friends like www, while others prefer WWW without it.
Step 3: ask if we need to add multiple other domain names. We can choose N or Y. The default path file is wwwroot followed by adding our domain name as the directory, this is good. You can directly see which domain name corresponds to it.
Step 4: ask if we need to add pseudo-static data. Generally, lnmp uses common CMS such as discuz and Wordpress by default. If there is any additional CMS, we need to add it ourselves. Let's talk about it later, N is generally selected here.
Step 5: ask if we need to create a log file. I do not recommend creating it because it occupies too much content in the system after creation, which is also N, and then press any key to install it.
In this way, we add the laozuo.org domain name to our VPs. In this way, we only need to resolve the record of the domain name to the IP address of the VPs to start the website creation journey. In the next article, I will share with you how to use commands to install Wordpress and create a blog to improve efficiency.