Skip to content

Instantly share code, notes, and snippets.

@nw
Created August 26, 2015 21:33
Show Gist options
  • Save nw/eee923e628ba24470bd2 to your computer and use it in GitHub Desktop.
Save nw/eee923e628ba24470bd2 to your computer and use it in GitHub Desktop.
# example uses shared folder /media/sf_vm/www, change for your needs
sudo usermod -a -G vboxsf www-data
sudo usermod -a -G vboxsf <user name>
cd /etc/apache2/sites-available
sudo cp 000-default.conf weblab.conf
sudo nano weblab.conf
// Change DocumentRoot to point at your shared mount `www` directory /media/sf_vm/www
// cntrl-x then 'Y' to save changes
cd ../sites-enabled/
sudo rm 000-default.conf
sudo ln -s ../sites-available/weblab.conf weblab.conf
cd ../conf-available
sudo nano host-share.conf
# add contents of host-share.conf below
cd ../conf-enabled
sudo ln -s ../conf-available/host-share.conf host-share.conf
cp /var/www/html/index.html /media/sf_vm/www/index.html
cd /media/sf_vm/www
nano info.php
# add contents of info.php below and save
sudo apt-get install phpmyadmin
# sudo apt-get purge phpmyadmin // interactive install is easy to screw up, this is just incase to start the process over.
sudo service apache2 restart
<Directory /media/sf_vm/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
EnableSendfile Off
EnableMMAP Off
</Directory>
<?php
phpinfo();
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment