Change Apache2 Webfolder

Problem: I have stored my local Websites in ~/Documents/Sites/ however the standard Apache2 Directory is /var/www/html. To change this:
1) vi /etc/apache2/sites-available/000-default.conf
2) Change DocumentRoot to desired location: /path/to/my/project
3) vi /etc/apache2/apache2.conf
4) Change directory setting to:

< Directory />
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
< /Directory>

5) Restart Apache: sudo service apache2 restart

In case css-files are not loaded… In my case this had been caused by php-includes which are not processed, as php was not installed: Install php.

see: askubuntu

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.