【问题标题】:Root directory of web serverWeb服务器的根目录
【发布时间】:2012-09-29 06:41:30
【问题描述】:

Apache Web Server 的根目录是什么?

我使用的是 Windows XP。我的 Apache 服务器安装在:

C:\Program Files\Apache Software Foundation\

我想托管一个服务器,它的手册说:

将该目录下的所有文件和子目录移动到网络服务器的根目录

【问题讨论】:

  • C:盘中没有www文件夹。

标签: apache webserver


【解决方案1】:

这取决于您如何配置服务器。 “根目录”实际上称为文档根,它是Apache HTTP 服务器将从中提供文件的目录。它可以使用DocumentRoot 指令进行更改,您应该能够在配置文件中找到它(例如/etc/apache2/apache2.conf)。

来自documentation

例如,如果 DocumentRoot 设置为 /var/www/html,则对 http://www.example.com/fish/guppies.html 的请求将导致文件 /var/www/html/fish/guppies.html 被提供给请求的客户端。

【讨论】:

    猜你喜欢
    • 2011-03-04
    • 2011-09-08
    • 2013-07-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-05-16
    • 2015-11-14
    • 1970-01-01
    相关资源
    最近更新 更多