最近我安装的Nginx和想改变的根目录,但我不知道有什么区别之间/var/www和/srv/www当我应该使用/var/www或/srv/www?
ETL*_*ETL 10
区别在于:不同的文件结构。不同的服务器实现的文件结构略有不同。
这里有一个很好的链接,描述了 Linux 中的常见文件结构: Linux Directory Structure (File System Structure) Explained with Examples
由此:
/var – 变量文件
Run Code Online (Sandbox Code Playgroud)- var stands for variable files. - Content of the files that are expected to grow can be found under this directory. - This includes — system log files (/var/log); packages and database files (/var/lib); emails (/var/mail); print queues (/var/spool); lock files (/var/lock); temp files needed across reboots (/var/tmp);/srv – 服务数据
Run Code Online (Sandbox Code Playgroud)- srv stands for service. - Contains server specific services related data. - For example, /srv/cvs contains CVS related data.
基于此,/srv似乎更合适。但是,Linux的例如Ubuntu的味道一般不使用一个/srv文件结构,而是采用了var目录www。所以我认为关键是与您使用的操作系统保持一致。
| 归档时间: |
|
| 查看次数: |
4110 次 |
| 最近记录: |