3
votes

I'm attempting to use Jeffrey Way's Vagrant setup (https://github.com/JeffreyWay/Vagrant-Setup) and it almost works for me on a Mac running Yosemite. When Apache restarts at the very end, I get an error stating:

==> default: AH00112: Warning: DocumentRoot [/var/www/html] does not exist
==> default: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message

Prior to that in his install.sh, he's deleting the html directory and doing a symlink it looks like (I'm new to this, sorry).

To fix it, I ssh into Vagrant, edit /etc/apache2/sites-available/000-default.conf and change the DocumentRoot from /var/www/html to just /var/www and then I'm able to view my site on localhost:8080.

How should I be doing this though so it just works out of the box?

1

1 Answers

3
votes

Add the below line after the line sudo ln -fs /vagrant/public /var/www (#38) in install.sh

sed -i "s#DocumentRoot /var/www/html#DocumentRoot /var/www#g" /etc/apache2/sites-available/000-default.conf

Running the updated install script should automatically replace the DocumentRoot from /var/www/html to just /var/www