What's root directory for LNMP Image? You should know the root directory is the application source code folder for your VirtualHost on Cloud Server


In the initialization state of LNMP, only one VirtualHost has been created, you can get the path from /etc/nginx/conf.d/default.conf like below:


server
{
listen 80;
server_name www.example.com  example.com;
index index.html index.htm index.php;
root  /data/wwwroot/www.example.com;
error_log /var/log/nginx/example.com-error.log crit;
access_log  /var/log/nginx/example.com-access.log;

include conf.d/extra/*.conf;

# include Rewrite
# include conf.d/rewrite/wordpress.conf;
}


root "/data/wwwroot/www.example.com", this is the "root directory" for your first VirtualHost. 



You can create more than two VirtualHost/Application on your Cloud Server, that mean there have more than two root directory on LNMP. Then, you should bind domain name for all VirtualHost and visit them by domain.