Changing Apache2 docRoot on Debian 8
If you do not have apache2 install do it before watching video
Please note, that this only applies for Debian 8 and newer releases.
In Debian, the document root was set to /var/www/html.
It was configured in the following file:
So just do a:
sudo nano /etc/apache2/sites-available/000-default.conf
and change the following line to what you want:
DocumentRoot /var/www/html the webserver to look for a index file
sudo nano /etc/apache2/apache2.conf
and find this
Options Indexes FollowSymLinks
Require all granted
and change /var/www/html to your preferred directory
and save and exit.
After you saved your changes, just restart the apache2 webserver and you’ll be done 🙂
sudo service apache2 restart