LNMP adds a website with one click: configure domain name + create new MySQL + configure https certificate

888u

Last update at :2024-03-05,Edit by888u

Previously I introduced how to install the LNMP environment on VPS with one click (one-click installation of the LNMP environment on Linux, supporting CentOS/Ubuntu/Debian). Today Lao Wang introduced how to add a website (vhost) with one click based on the LNMP script, including Configure the website domain name, create a new MySQL database, and configure a free https certificate.

LNMP environment setup

About the introduction, installation, and configuration file path of LNMP, this site has introduced it before. For details, please refer to: One-click installation of LNMP environment on Linux, supporting CentOS / Ubuntu / Debian. Follow this tutorial to install the LNMP environment on VPS. That’s it.

LNMP add website

Tips: When adding a website, please be sure to confirm that the domain name has been resolved to your VPS: Domain name resolution tutorial: Cloudflare resolution and DNSPod resolution.

The website in the LNMP script is also called a vhost. A vhost represents a website. A VPS can have multiple websites (vhosts) at the same time. After successfully installing the LNMP environment, directly execute the following command to add the website:

lnmp vhost add

You will then be prompted to enter the corresponding website information, including domain name (such as www.vpsgo.com of this website), domain name alias (for example, when you visit vpsgo.com, you will be redirected to this website), website data path and The log path can be defaulted (just press Enter). If you are building a WordPress website, then select wordpress for the rewrite rule. After that, to create a new MySQL database, you must first enter your MySQL root password (the password will not be displayed, just press Enter after entering it) That's it), the MySQL root password is the password you set when installing the LNMP environment. Finally, choose to enable the free https certificate. The free certificate uses the Let's Encrypt certificate, and the script will be automatically updated. After everything is correct, press any key to complete the website addition:

LNMP adding a website takes about 30 seconds. After that, you can open your website by directly entering your domain name in the browser (but it is still a blank page currently).

Other operations on the LNMP website

About LNMP website management, it generally also includes the following commands:

Add site: lnmp vhost add

Delete site: lnmp vhost del

View all sites: lnmp vhost list

Recommended site search: free asp space application, shopex space, com domain name price, network server rental, in domain name registration, domain name query network, Guangdong hosting, mainland China php space, domain name check, is there any charge for domain name registration?< /p>

LNMP adds a website with one click: configure domain name + create new MySQL + configure https certificate

All copyrights belong to 888u unless special state
取消
微信二维码
微信二维码
支付宝二维码