" vagrant up"无法运行vagrant.local。和"流浪汉提供"

时间:2018-01-18 11:07:39

标签: wordpress vagrant

我有一个WordPress VIP多站点主题设置,我需要在当地环境中使用vagrant运行。

我运行vagrant up然后vagrant provision,但这不再给我网址(vagrant.local)了。几个月前,当我上次在这个网站上工作时,我得到了这个。

我是否需要在/etc/hosts文件中进行任何更改?

vagrant up命令的输出:

/opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/util/platform.rb:25: warning: Insecure world writable dir /home/subrara/.phpbrew/php in PATH, mode 040777
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'bento/ubuntu-16.04' is up to date...
==> default: A newer version of the box 'bento/ubuntu-16.04' is available! You currently
==> default: have version '2.3.5'. The latest is version '201801.02.0'. Run
==> default: `vagrant box update` to update.
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostonly
==> default: Forwarding ports...
    default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Setting hostname...
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
    default: /vagrant => /var/www/wp-projects/yrc
    default: /var/log/php => /var/www/wp-projects/yrc/logs/php
==> default: Detected mount owner ID within mount options. (uid: 1000 guestpath: /var/log/php)
==> default: Detected mount group ID within mount options. (gid: 1000 guestpath: /var/log/php)
    default: /var/log/nginx => /var/www/wp-projects/yrc/logs/nginx
==> default: Detected mount owner ID within mount options. (uid: 1000 guestpath: /var/log/nginx)
==> default: Detected mount group ID within mount options. (gid: 1000 guestpath: /var/log/nginx)
    default: /tmp/vagrant-puppet/manifests-846018e2aa141a5eb79a64b4015fc5f3 => /var/www/wp-projects/yrc/puppet/manifests
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.

vagrant provision命令的输出:

/opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/util/platform.rb:25: warning: Insecure world writable dir /home/subrara/.phpbrew/php in PATH, mode 040777
==> default: Running provisioner: shell...
    default: Running: /tmp/vagrant-shell20180118-22825-89veip.sh
==> default: Running provisioner: puppet...
==> default: Running Puppet with development.pp...
==> default: Notice: Compiled catalog for vagrant.local in environment production in 3.86 seconds
==> default: Notice: Finished catalog run in 5.38 seconds
==> default: Running provisioner: shell...
    default: Running: /tmp/vagrant-shell20180118-22825-uoa51f.sh

当我跑http://vagrant.local时,收到以下消息:

  

无法使用加载wpcom-legacy-redirector-1.3.0(插件)   wpcom_vip_load_plugin()!

我的Vagrantfile位于/var/www/wp-projects/wpms文件夹内,我正在从此目录运行vagrant个命令。但是,我的主题的路径是/var/www/wp-projects/wpms/wp/wp-contnet/themes/vip/tourism-theme

我错过了什么吗?我不是流浪环境的常客。我在Ubuntu 140.04上。

编辑:

截图 enter image description here

1 个答案:

答案 0 :(得分:0)

我在大四的帮助下解决了这个问题!这就是我做的。 该插件实际上是WordPress VIP插件的一部分,它位于wp-content/themes/vip/plugins目录下。最新被拉入此目录。一旦我这样做,一切都开始正常工作了!