How to change the Apache document root folder on a Chromebook
How to change the Apache document root folder on a Chromebook
- Open Terminal
- Run
cd
to make sure you’re in your home directory: - Copy the
000-default.conf
file to your home directory:cp /etc/apache2/sites-available/000-default.conf ./
- Open the
000-default.conf
in your Chromebook text editor. - Edit the
DocumentRoot
option:DocumentRoot /path/to/home/directory/www/html
-
Move
000-default.conf
back to :sudo cp 000-default.conf /etc/apache2/sites-available/
- Similarly, enable files and directory listing:
/etc/apache2/apache2.conf
- Change
<Directory /var/www/>
to<Directory /path/to/home/directory/www/>
- Then restart the apache server:
sudo service apache2 restart
Sources
- https://askubuntu.com/questions/337874/change-apache-document-root-folder-to-secondary-hard-drive
- https://francescoficarola.com/apache-enable-files-directory-listing/
Written on March 15, 2020