I need “/var/www” but Apache2 try to use an empty “/var/www/html”

后端 未结 2 1030
耶瑟儿~
耶瑟儿~ 2021-02-09 12:03

This days I sleep with my http://localhost working, and reading pages from /var/www...

I woke up with an "AH00094" error at Apache2

2条回答
  •  面向向阳花
    2021-02-09 12:52

    If you want to use /www as root folder instead of /www/html you can simply edit the apache2 config file to have /var/www

    Edit 000-default.conf

    sudo gedit /etc/apache2/sites-available/000-default.conf
    

    then change

    DocumentRoot /var/www/html 
    

    to

    DocumentRoot /var/www
    

    Restart apache2 server :

    sudo service apache2 restart
    

提交回复
热议问题