root@leeyoung-Satellite-M300:/etc/apache2/sites-available# nano 000-default.conf
<IfModule dir_module> DirectoryIndex index.html index.php index.htm Alias /test "/home/leeyoung/workspace/test" <Directory /home/leeyoung/workspace/test> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory> </IfModule>
加入到文件末尾
root@leeyoung-Satellite-M300:/etc/apache2/sites-available# sudo /etc/init.d/apache2 restart