apache - 为什么Apache指向/var/www?

标签 apache webserver

这只是为了我自己的好奇心。 var 目录的目的不是保存系统写入的文件吗?例如:日志、缓存、锁等。

我知道您可以通过修改配置文件将 apache 指向任何地方,但我只是不明白为什么默认位置是/var/www。

最佳答案

/var/是为了

Variable files —- files whose content is expected to continually change during normal operation of the system —- such as logs, spool files, and temporary e-mail files. Sometimes a separate partition.



-- Wikipedia

因此不一定是系统写的东西。我同意 www有点奇怪 - 它不应该是所有可变的。一些发行版在 /usr/share 下有它,一些在其他地方 - /var/www没有得到普遍承认。实际上,根据FHS ,www 数据应该在 /srv 下,但我遇到的几个系统似乎都坚持这一点。

关于apache - 为什么Apache指向/var/www?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6322520/

相关文章:

php - 请求超出了 10 个内部重定向的限制

c# - .NET 相互 SSL 握手 'Client Authentication'

apache - 对象移至此处 - Apache Jmeter

postgresql - 尽管有开放的信任设置,Postgres 9.2 数据库仍要求输入密码

http - Web 服务器如何知道发布给它们的表单中使用的字符集?

php - Symfony 3 - Doctrine\Common\Annotations\AnnotationRegistry::registerLoader() 必须是 Doctrine\Common\Annotations\void 的实例,没有返回

php - 如何在 .htaccess 中编写 AddHandler?

apache - 使用 FilesMatch 指令匹配文件名的一部分

html - 一种 CSS 样式仅适用于本地主机而不适用于服务器托管

url - 如何从 golang 中的确切 url 重定向?