Which partition does linux people usually put the web directory under? Is it safe to put it under the /data directory?

  html5, question

Which partition does linux people usually put the web directory under?
put in a certain position/dataIs it safe under the catalog?
The default configuration web directory of the lnmp integration environment that I used before has been placed in the/home/wwwroot/Inside
This time I want to change to/dataI don’t know if it is OK.

Security is determined by directory permissions, not the question of /home or /data. For example, your nginx is started by www users. The html directory is called htdocs and can be set as follows:

drwxr-----  2 www  www          6 02-17 15:20 htdocs

Among them, www users are prohibited from logging in as much as possible with -s /sbin/nologin, and whether to give write (W) and execute (X) permissions depends on your needs.
Note: Giving permission is the principle of minimization.

BTW: if the html in your /home directory is too large, you can mv to the /data directory and link to the /home directory with ln -s s.