1. sudo apt-get install apache2
2. 查找网站目录
grep -iR DocumentRoot /etc/apache2
- /etc/apache2/sites-available/000-default.conf: DocumentRoot /var/www/html
- /etc/apache2/sites-available/default-ssl.conf: DocumentRoot /var/www/html
- /etc/apache2/sites-enabled/000-default.conf: DocumentRoot /var/www/html
3. 查找默认主页
grep -iR DirectoryIndex /etc/apache2
- /etc/apache2/mods-available/dir.conf: DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm
- /etc/apache2/mods-enabled/dir.conf: DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm
4. 重启
sudo /etc/init.d/apache2 restart