- 启动
sudo /etc/init.d/apache2 start
- 退出
sudo /etc/init.d/apache2 stop
- 重启
sudo /etc/init.d/apache2 restart
- 一些设置
默认只能在/var/www/html中添加文件,如果需要改变根目录,在/etc/apache2/sites-available修改文件,将/var/www/html改为/var/www或其他目录
sudo /etc/init.d/apache2 start
sudo /etc/init.d/apache2 stop
sudo /etc/init.d/apache2 restart