我正在使用Scotchbox(box.scotch.io)进行Vagrant。 自从他们上次更新后我得到一个文档根缺失错误( AH00112:警告:DocumentRoot [/ var / www / mypage]不存在 )当我尝试在Apache中设置我的一些域配置时。 我无法确定自Scotch 2.0以来是否对设置进行了更改,或者由于某些原因Vagrant是否已经使这些文件夹变得黯然失色。 我的设置如下,
流浪文件路径
config.vm.synced_folder ".", "/var/www", :mount_options => ["dmode=777", "fmode=666"]Apache域配置路径
<VirtualHost *:80> ServerAdmin webmaster@localhost ServerName mypage.dev ServerAlias www.mypage.dev DocumentRoot /var/www/mypage </VirtualHost>000-default和scotchbox配置文件都指向/ var / www / public。 我的默认dev文件夹位于~username / Development,该文件夹是我的Vagrant文件。 有任何想法吗? 如果我需要提供其他详细信息,请与我们联系。
更新:切换到Docker。 厌倦了这一点。
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.
最满意答案
我刚刚克隆了Scotchbox ,我的Vagrant文件还包含:
config.vm.synced_folder ".", "/var/www", :mount_options => ["dmode=777", "fmode=666"]我的apache配置( /etc/apache2/sites-enabled/000-default.conf )看起来:
<VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /var/www/public ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>我在主机上的根目录中有public目录, ls -1打印:
README.md Vagrantfile public它对我有用!
在您的情况下,您需要更新apache配置,并具有:
DocumentRoot /var/www/public并注意您在Vagrantfile附近有public目录。 如果你有目录mypage - 然后运行mv mypage public
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 publicAnd it works for me!
In your case, you need update apache config, and have:
DocumentRoot /var/www/publicAnd pay attention that you have public directory near Vagrantfile. If you have directory mypage - then run mv mypage public
更多推荐
发布评论