如何使用 apache2 运行我的 html 文件

use*_*274 1 apache ubuntu

也许这不是问这个问题的正确渠道,但我不知道该问哪里。

我想知道如何在我的 ubuntu 上使用 apache 运行 html 文件。我已经用 javascript 和一个 html 文件编写了程序,我想通过 apache 运行它。我找不到 htdocs 文件夹来复制我的文件,此外我无权在 ubuntu 中执行此操作。我的 apache 安装在 /usr/share/apache2 中。当我写http://localhost它时说:

It works!

This is the default web page for this server.

The web server software is running but no content has been added, yet.
Run Code Online (Sandbox Code Playgroud)

但我不知道在哪里添加内容。

任何帮助。

Lei*_*igh 6

它提供 HTML 文件的默认文件夹是/var/www.

例如,/var/www/test.html将是http://localhost/test.html