0
votes

I'm using Scotchbox (box.scotch.io) for Vagrant. Since their last update I get a document root missing error (AH00112: Warning: DocumentRoot [/var/www/mypage] does not exist) when i try and set up my some domain configs in Apache. I can't really determine whether its a change in settings since Scotch 2.0 or if Vagrant for some reason has descyned these folders. My setup as follows,

Vagrant file pathway

config.vm.synced_folder ".", "/var/www", :mount_options => ["dmode=777", "fmode=666"]

Apache domain config pathway

<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        ServerName mypage.dev
        ServerAlias www.mypage.dev
        DocumentRoot /var/www/mypage
</VirtualHost>

The 000-default and scotchbox config files both point to /var/www/public. My default dev folder is located at ~username/Development, in that folder is my Vagrant file.

Any ideas?
Let me know if I need to provide other details.

Update: Switching to Docker. Tired of this.

1

1 Answers

1
votes

I've just cloned Scotchbox and my Vagrant file also contains:

config.vm.synced_folder ".", "/var/www", :mount_options => ["dmode=777", "fmode=666"]

My apache config (/etc/apache2/sites-enabled/000-default.conf) looks:

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/public
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

And I have public directory in my root dir on the host machine, ls -1 prints:

README.md
Vagrantfile
public

And it works for me!

In your case, you need update apache config, and have:

DocumentRoot /var/www/public

And pay attention that you have public directory near Vagrantfile.
If you have directory mypage - then run mv mypage public