jiangzhaowei

1、安装

  sudo apt-get install apache2

2、重启:

  sudo service apache2 resatrt

3、设置根目录:

  /var/www

  设置方法:

  2.2版:

  /etc/apache2/sites-enabled/default 修改 DocumentRoot,

  并修改对应写有原路径(默认是/var/www)的Directory标签,即要改两处。DocumentRoot末尾不要加 / ,Directory标签要加 / 。

  

  2.4版:

  /etc/apache2/sites-enabled/000-default.conf 修改 DocumentRoot,

  

  /etc/apache2/apache2.conf 修改对应的Directory标签

  

   修改任何设置后,用命令sudo service apache2 restart重启服务。

分类:

技术点:

相关文章:

  • 2021-04-28
  • 2021-12-05
  • 2021-10-29
  • 2021-12-06
  • 2022-02-09
  • 2021-04-30
  • 2022-12-23
  • 2021-07-12
猜你喜欢
  • 2021-04-10
  • 2021-11-16
  • 2021-12-17
  • 2022-12-23
  • 2021-09-20
  • 2021-11-10
相关资源
相似解决方案