Ubuntu 16.04 Apache2 更改访问html根路径方案(可解决403)

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