In LNMP 2.1, delete the default Default virtual host process
1. In LNMP 2.1, delete the default Default virtual host process. Looking at the directory, only .user.ini is left in /home/wwwroot/default, and other files have been manually deleted. as shown in Figure 1
[root@iZ2zeaj7tnbv8d3gsoy1w5Z wwwroot]# cd default/
[root@iZ2zeaj7tnbv8d3gsoy1w5Z default]# ls -la
total 4
drwxr-xr-x 2 www www 23 Mar 8 19:17 .
drwxr-xr-x 4 root root 32 Mar 8 16:57 ..
-rw-r--r-- 1 root root 48 Mar 8 16:43 .user.ini
[root@iZ2zeaj7tnbv8d3gsoy1w5Z default]# pwd
/home/wwwroot/default
[root@iZ2zeaj7tnbv8d3gsoy1w5Z default]#
2. Reference: lnmp add and delete virtual host and pseudo-static use tutorialhttps://lnmp.org/faq/lnmp-vhost-add-howto.html. But there is no default virtual host. as shown in Figure 2
[root@iZ2zeaj7tnbv8d3gsoy1w5Z default]# lnmp vhost list
+-------------------------------------------+
| Manager for LNMP, Written by Licess |
+-------------------------------------------+
| https://lnmp.org |
+-------------------------------------------+
Nginx Virtualhost list:
objectapi.ikhw.cn
object.ikhw.cn
3. Although the file /usr/local/nginx/conf/nginx.conf exists, it contains server server_name _; root /home/wwwroot/default;. Decided to remove this server-related configuration. as shown in Figure 3
4. The .user.ini file cannot be directly modified. If you want to repair or delete it, you need to execute it first: chattr -i /home/wwwroot/default/.user.ini. rm -f /home/wwwroot/default/.user.ini is fine. as shown in Figure 4
[root@iZ2zeaj7tnbv8d3gsoy1w5Z default]# chattr -i /home/wwwroot/default/.user.ini
[root@iZ2zeaj7tnbv8d3gsoy1w5Z default]# ls -la
total 4
drwxr-xr-x 2 www www 23 Mar 8 19:17 .
drwxr-xr-x 4 root root 32 Mar 8 16:57 ..
-rw-r--r-- 1 root root 48 Mar 8 16:43 .user.ini
[root@iZ2zeaj7tnbv8d3gsoy1w5Z default]# rm -f /home/wwwroot/default/.user.ini
[root@iZ2zeaj7tnbv8d3gsoy1w5Z default]# ls -la
total 0
drwxr-xr-x 2 www www 6 Mar 18 10:41 .
drwxr-xr-x 4 root root 32 Mar 8 16:57 ..
[root@iZ2zeaj7tnbv8d3gsoy1w5Z default]# cd ..
[root@iZ2zeaj7tnbv8d3gsoy1w5Z wwwroot]# ls -l
total 0
drwxr-xr-x 2 www www 6 Mar 18 10:41 default
drwxr-xr-x 4 root root 64 Mar 11 14:56 object
[root@iZ2zeaj7tnbv8d3gsoy1w5Z wwwroot]# rm -rf default/
[root@iZ2zeaj7tnbv8d3gsoy1w5Z wwwroot]# ls -la
total 0
drwxr-xr-x 3 root root 17 Mar 18 10:42 .
drwxr-xr-x. 5 root root 47 Mar 8 16:43 ..
drwxr-xr-x 4 root root 64 Mar 11 14:56 object
5. Execute lnmp nginx reload and reload the nginx configuration.



