我缺少哪个步骤来有效地更新 DocumentRoot?

我缺少哪个步骤来有效地更新 DocumentRoot?

我正在使用一个新的 VPS,并且已经从开发服务器复制了软件以在子域上显示。

目前,至少除了修改 /var/www/html 之外,我还没有设法让 Apache 显示除 Debian Apache“成功了!”页面之外的任何其他内容。我的站点启用条目显示为:

<VirtualHost *:80>
    # The ServerName directive sets the request scheme, hostname and port that
    # the server uses to identify itself. This is used when creating
    # redirection URLs. In the context of virtual hosts, the ServerName
    # specifies what hostname must appear in the request's Host: header to
    # match this virtual host. For the default virtual host (this file) this
    # value is not decisive as it is used as a last resort host regardless.
    # However, you must set it for any further virtual host explicitly.
    #ServerName www.example.com

    ServerName apps.example.com
    ServerAdmin webmaster@localhost
    DocumentRoot /path/apps/www/
    DirectoryIndex index.cgi

    # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
    # error, crit, alert, emerg.
    # It is also possible to configure the loglevel for particular
    # modules, e.g.
    #LogLevel info ssl:warn

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    # For most configuration files from conf-available/, which are
    # enabled or disabled at a global level, it is possible to
    # include a line for only one particular virtual host. For example the
    # following line enables the CGI configuration for this host only
    # after it has been globally disabled with "a2disconf".
    #Include conf-available/serve-cgi-bin.conf
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

如果 index.cgi 有问题,我希望看到描述性的错误消息(或显示脚本的源代码)。

我应该调查什么才能赋予这个 VirtualHost 自己的 DocumentRoot?

谢谢,

- 更新 -

我的意思是问如何才能让想要注册的 DocumentRoot。我查看了错误日志,但什么也没找到。

--附加更新--

apache2.conf 有:

<Directory /path/apps/www>
Options ExecCGI Indexes FollowSymLinks
AllowOverride All
AddHandler cgi-script .cgi
Require all granted
</Directory>

错误信息现已更改为:

禁止

您无权访问此资源。

Apache/2.4.38 (Debian) 服务器位于 example.com 端口 80

--附加更新--

Directory条目首先具有 index.cgi 的 DirectoryIndex。

据我所知,行为没有发生任何变化。

相关内容