Home Website Building Knowledge Standard Post

Standard Post

#Website Building# LNMP One-Click Package Adding Virtual Host Graphic and Video Tutorial

After sharing the LNMP one-click package installation tutorial earlier, this article will show you how to add a virtual host using LNMP. LNMP Add Virtual Host Tutorial After connecting to the VPS via SSH, enter the command to add a virtual host: lnmp vhost add, then press Enter. The following prompt appears: Enter your...

Updated on December 15, 2019 About 2 minutes read
#建站#LNMP一键包添加虚拟主机图文视频教程

Previously, we shared#Web Development# LNMP One-Click Package Installation Graphic & Video Tutorial, this article shares how to use LNMP to add a virtual host.

LNMP Virtual Host Addition Illustrated Tutorial

After connecting to the VPS via SSH, enter the command to add a virtual host: <code>lnmp vhost add</code>, then press Enter. The following prompt will appear:

LNMP添加虚拟主机教程

Enter the domain name you wish to bind here, then press Enter.

LNMP添加虚拟主机教程

This asks if you need to bind any other domain names.

What does this mean?For example, if you need both www.naibabiji.com and naibabiji.com to access the same website, then you need to enter it here. Otherwise, just press Enter to skip.

LNMP添加虚拟主机

This sets the website directory. Just press Enter, and the website directory will be set to the domain folder under <code>/home/wwwroot</code>.

是否启用伪静态

Whether to enable pseudo-static, enter y and press Enter.

输入伪静态规则

Enter the rewrite rules here. For installing WordPress, simply enter <code>wordpress</code>. If WordPress is installed in a subdirectory, enter <code>wp2</code>.

是否启用log

Enable website logs? Enter 'y' to enable, 'n' to disable.

LNMP日志名称

If enabled, you need to enter the name for the log file. The default log directory is: <code>/home/wwwlogs/</code>. The default filename is: <code>domain.log</code>.

启用数据库

Create a database? Select 'y' for yes. If you want to create it manually or use a database from elsewhere, choose 'n'.

LNMP输入数据库

Enter the database password, then enter the database name and password to create, and press Enter.

生成SSL

Then enter y to generate an SSL certificate, and enter 2 to create a free Let's Encrypt certificate. If you have your own certificate, enter 1 and then enter the corresponding certificate path.

SSL证书

When the interface shown above appears, it proves the virtual host has been successfully added.

LNMP Virtual Host Addition Video Tutorial

If you have further questions, you can add WeChat or join the group for discussion.

Rate this article post
Previous Complete VPS Testing Scripts: 2026 Latest VPS Performance and Network Speed Testing Methods Continue reading content around the same timeline. Next #Website Building# LNMP installation WordPress graphic and video tutorial View the next related tutorial or experience.

AI Website Building Assistant

🤖
Hello! I am the Naibabiji AI Assistant. How can I help you?
Quick Consultation: