【发布时间】:2019-11-20 14:20:35
【问题描述】:
我在 ubuntu 上安装了 apache 服务器以在本地测试我的应用程序。
该服务器上托管的应用程序都在位于以下路径/var/www/html的html文件夹中
当我写 localhost 时,它会显示我的 html 文件中的文件夹索引。
假设我的应用程序名为 application01,要运行它,我必须将localhost/application01/src/en/index.html 写入地址栏。
我希望能够访问它而不需要包含整个路径。
类似这样的:
我的 apache2.config 文件包含以下内容:
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>
<Directory /var/www/html/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
我尝试将目录更改为/var/www/html/application01/src/,但没有成功。
谢谢。
【问题讨论】: