(1)确定html文件在服务器主机上的部署路径。例:/home/test/web/
(2)修改 vim sites-enabled/000-default.conf 中 DirectoryRoot 为 :/home/test/web/
(3)修改 /etc/apache2/apache2.conf:vim apache2.conf
修改结果如下所示:
<Directory /home/test/web/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
(4)如果未起作用,重启下 apache2 :service apache2 restart