Connect to vagrant box via proxy - windows 10 - vagrant

I'm trying my first Vagrant setup and have used puphpet to generate a vagrant setup that should suit my needs.
Everything seems to run fine when I run vagrant up and I am able to ssh into vagrant. My issue is how to connect to my local sites that are mapped to the folder structure on the VM.
I had thought the private IP would be what I would use to add entries to my host file but it's not loading. This is my config.yaml:
vagrantfile:
target: local
vm:
provider:
local:
box: bento/ubuntu-16.04
box_url: 'false'
box_version: '0'
chosen_virtualizer: virtualbox
virtualizers:
virtualbox:
modifyvm:
natdnshostresolver1: false
showgui: 0
vmware:
numvcpus: 1
parallels:
linked_clone: 0
check_guest_tools: 0
update_guest_tools: 0
machines:
machine1:
id: 'perch vagrant'
hostname: perch.puphpet
network:
private_network: 10.1.0.82
forwarded_port:
port1:
host: '7720'
guest: '22'
memory: '1024'
cpus: '1'
provision:
puppet:
manifests_path: puphpet/puppet/manifests
module_path:
- puphpet/puppet/modules
- puphpet/puppet/manifests
options:
- '--verbose'
- '--hiera_config /opt/puphpet/puppet/hiera.yaml'
synced_folder:
folder1:
owner: vagrant
group: vagrant
source: 'C:/Users/My Name/Documents/www'
target: /var/www
sync_type: nfs
smb:
smb_host: ''
smb_username: ''
smb_password: ''
mount_options:
dir_mode: '0775'
file_mode: '0664'
rsync:
args:
- '--verbose'
- '--archive'
- '-z'
exclude:
- .vagrant/
- .git/
auto: 'true'
usable_port_range:
start: 10200
stop: 10500
post_up_message: ''
ssh:
host: 'false'
port: 'false'
private_key_path: 'false'
username: vagrant
guest_port: 'false'
keep_alive: '1'
forward_agent: 'false'
forward_x11: 'false'
shell: 'bash -l'
insert_key: 'false'
vagrant:
host: detect
proxy:
http: 'http://192.168.0.2:3128'
https: 'http://192.168.0.2:3128'
ftp: 'http://192.168.0.2:3128'
no_proxy: ''
enabled: '1'
server:
install: '1'
packages:
- bash-completion
- htop
- vim
users_groups:
install: '1'
groups: { }
users: { }
locale:
install: '1'
settings:
default_locale: en_GB.UTF-8
locales:
- en_GB.UTF-8
- en_US.UTF-8
timezone: GMT
firewall:
install: '1'
rules: { }
resolv:
install: '1'
nameservers:
- 8.8.8.8
- 8.8.4.4
domainname: ''
searchpath: { }
cron:
install: '1'
jobs: { }
nginx:
install: '0'
settings:
version: present
default_vhost: 1
proxy_buffers: '4 256k'
proxy_buffer_size: 128k
proxy_connect_timeout: 600s
proxy_send_timeout: 600s
proxy_read_timeout: 600s
names_hash_bucket_size: 128
upstreams: { }
vhosts:
vhost1:
server_name: mysite.test
server_aliases:
- www.mysite.test
www_root: /var/www/mysite
listen_port: '80'
client_max_body_size: 1m
ssl: '0'
locations:
php_html:
www_root: /var/www/mysite
location: /
autoindex: 'off'
internal: 'false'
index_files:
- index.html
- index.php
try_files:
- $uri
- $uri/
- /index.php$is_args$args
php_php:
www_root: /var/www/mysite
location: '~ \.php$'
autoindex: 'off'
internal: 'false'
index_files:
- index.php
try_files:
- $uri
- $uri/
set:
- '$path_info $fastcgi_path_info'
fastcgi: '127.0.0.1:9000'
fastcgi_index: index.php
fastcgi_split_path: '^(.+?\.php)(/.*)$'
fast_cgi_params_extra:
- 'SCRIPT_FILENAME $document_root$fastcgi_script_name'
proxies: { }
apache:
install: '1'
settings:
version: 2.4
user: www-data
group: www-data
default_vhost: true
manage_user: false
manage_group: false
sendfile: 0
modules:
- proxy_fcgi
- rewrite
- headers
- info
- proxy
- vhost_alias
- cache
- deflate
- proxy_http
vhosts:
vhost1:
servername: mysite.test
serveraliases:
- www.mysite.test
docroot: /var/www/mysite
port: '80'
setenvif:
- 'Authorization "(.*)" HTTP_AUTHORIZATION=$1'
ssl: '0'
ssl_cert: LETSENCRYPT
ssl_key: LETSENCRYPT
ssl_chain: LETSENCRYPT
ssl_certs_dir: LETSENCRYPT
ssl_protocol: ''
ssl_cipher: ''
directories:
php_html:
provider: directory
path: /var/www/mysite
directoryindex: 'index.php index.html'
options:
- Indexes
- FollowSymlinks
- MultiViews
allow_override:
- All
require:
- 'all granted'
rewrites:
rewrite_0n7:
rewrite_base: ''
comment: ''
php_php:
provider: filesmatch
path: \.php$
sethandler: 'proxy:fcgi://127.0.0.1:9000'
letsencrypt:
install: '1'
settings:
email: ''
webserver_service: ''
domains: { }
php:
install: '1'
settings:
version: '7.2'
modules:
php:
- cli
- intl
- xml
- libgd2
- curl
- imagick
pear: { }
pecl: { }
ini:
display_errors: 'On'
error_reporting: '-1'
session.save_path: /var/lib/php/session
date.timezone: UTC
fpm_ini:
error_log: /var/log/php-fpm.log
fpm_pools:
pool1:
ini:
prefix: www
listen: '127.0.0.1:9000'
security.limit_extensions: .php
user: www-user
group: www-data
composer: '1'
composer_home: ''
xdebug:
install: '0'
settings:
xdebug.default_enable: '1'
xdebug.remote_autostart: '0'
xdebug.remote_connect_back: '1'
xdebug.remote_enable: '1'
xdebug.remote_handler: dbgp
xdebug.remote_port: '9000'
blackfire:
install: '0'
settings:
server_id: ''
server_token: ''
agent:
http_proxy: ''
https_proxy: ''
log_file: stderr
log_level: '1'
php:
agent_timeout: '0.25'
log_file: ''
log_level: '1'
wpcli:
install: '0'
drush:
install: '0'
version: 8.0.5
ruby:
install: '1'
versions:
ruby1:
default: '1'
bundler: '1'
version: '2.4'
gems:
- deep_merge#1.2.1
- activesupport#5.1.4
- vine#0.4
python:
install: '1'
packages: { }
versions: { }
nodejs:
install: '0'
settings:
version: '6'
npm_packages: { }
mariadb:
install: '0'
settings:
version: '10.1'
root_password: '123'
override_options: { }
users:
user1:
name: dbuser
password: '123'
databases:
database1:
name: dbname
collate: utf8_general_ci
sql: ''
grants:
grant1:
user: dbuser
table: '*.*'
privileges:
- ALL
mysql:
install: '1'
settings:
version: '5.7'
root_password: vagrant
override_options: { }
users:
user1:
name: dbuser
password: vagrant
databases:
database1:
name: dbname
collate: utf8_general_ci
sql: ''
grants:
grant1:
user: dbuser
table: '*.*'
privileges:
- ALL
postgresql:
install: '0'
settings:
global:
encoding: UTF8
version: '9.6'
server:
postgres_password: '123'
databases:
database1:
dbname: dbname
owner: dbuser
users:
user1:
username: dbuser
password: '123'
superuser: '1'
grants:
grant1:
role: dbuser
db: dbname
privilege:
- ALL
mongodb:
install: '0'
settings:
bind_ip: 127.0.0.1
port: '27017'
globals:
version: 3.6.2
databases:
database1:
name: dbname
user: dbuser
password: '123'
redis:
install: '0'
settings:
port: '6379'
sqlite:
install: '0'
databases:
database1:
name: dbname
owner: www-data
group: www-data
sql_file: ''
mailhog:
install: '0'
settings:
smtp_ip: 0.0.0.0
smtp_port: 1025
http_ip: 0.0.0.0
http_port: '8025'
path: /usr/local/bin/mailhog
beanstalkd:
install: '0'
settings:
listenaddress: 0.0.0.0
listenport: '11300'
maxjobsize: '65535'
maxconnections: '1024'
binlogdir: /var/lib/beanstalkd/binlog
binlogfsync: null
binlogsize: '10485760'
beanstalk_console: 0
rabbitmq:
install: '0'
settings:
port: '5672'
users:
user1:
admin: '1'
name: admin
password: '123'
tags:
- admin
vhosts: { }
plugins: { }
elastic_search:
install: '0'
settings:
version: 6.1.2
java_install: true
instances:
instance1:
name: es-01
jvm_options:
- '-Xms2G'
- '-Xmx2G'
Visiting mysite.test results in
Unable to connect
. I then tried adding it to my hosts file:
10.1.0.82 mysite.test
Which results in the same issue where I can't connect.

Related

Error trying to Homestead up after Vagrant update

I've been using Homestead in a Windows host for quite a while, running several projects (just one of them uses Laravel) at the same time without remarkable problems. But then I decided to try using another Vagrant environment with these projects. This decision has lead to problems trying to run Homestead again.
First, I created a custom environment from puphpet.com, pointing at the same folder location in the guest machine: d:\www, and, as said in their docs, ran vagrant up after extracting the downloaded zip. It asked me to upgrade Vagrant to version 1.8.x. So I did that downloading the latest Vagrant version and installing it in Windows.
Once installed, I get this message when doing homestead up:
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
chown id -u vagrant:id -g vagrant /vagrant
Stdout from the command:
Stderr from the command:
chown: changing ownership of ÔÇÿ/vagrantÔÇÖ: Not a directory
Next if I try to enter one of my Homestead sites, I get a blank page with this text:
No input file specified.
The Homestead.yaml file is the same as I had before:
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: C:\Users\Luis\.ssh\id_rsa.pub
keys:
- C:\Users\Luis\.ssh\id_rsa
folders:
- map: D:\www
to: /home/vagrant/Code
- map: D:\www\phpmyadmin
to: /home/vagrant/Code/phpmyadmin
- map: D:\www\codeigniter
to: /home/vagrant/Code/codeigniter
- map: D:\www\laravel
to: /home/vagrant/Code/laravel
- map: D:\www\mysite
to: /home/vagrant/Code/mysite
- map: D:\www\helpdesk
to: /home/vagrant/Code/helpdesk
sites:
- map: homestead.app
to: /home/vagrant/Code/laravel/public
- map: laravel.app
to: /home/vagrant/Code/laravel/public
- map: phpmyadmin.app
to: /home/vagrant/Code/phpmyadmin
- map: codeigniter.app
to: /home/vagrant/Code/codeigniter
- map: mysite.app
to: /home/vagrant/Code/mysite
- map: helpdesk.app
to: /home/vagrant/Code/helpdesk/public
databases:
- homestead
- codeigniter
- ceramicasmiramar
- laravel
- helpdesk
variables:
- key: APP_ENV
value: local
# blackfire:
# - id: foo
# token: bar
# client-id: foo
# client-token: bar
# ports:
# - send: 93000
# to: 9300
# - send: 7777
# to: 777
# protocol: udp
And this is the config.yaml file of the new environment I installed:
vagrantfile:
target: local
vm:
provider:
local:
box: puphpet/ubuntu1404-x64
box_url: puphpet/ubuntu1404-x64
box_version: '0'
chosen_virtualizer: virtualbox
virtualizers:
virtualbox:
modifyvm:
natdnshostresolver1: false
showgui: 0
vmware:
numvcpus: 1
parallels:
use_linked_clone: 0
check_guest_tools: 0
update_guest_tools: 0
machines:
vflm_owhi4bjucjib:
id: Vagrant2
hostname: vagrant2.puphpet
network:
private_network: 192.168.56.101
forwarded_port:
vflmnfp_wei9ytye6ol7:
host: '5444'
guest: '18'
memory: '512'
cpus: '1'
provision:
puppet:
manifests_path: puphpet/puppet/manifests
module_path: puphpet/puppet/modules
options:
- '--verbose'
- '--hiera_config /vagrant/puphpet/puppet/hiera.yaml'
synced_folder:
vflsf_z9dj2qmap2mz:
source: 'd:\www'
target: /var/www
sync_type: default
smb:
smb_host: ''
smb_username: ''
smb_password: ''
mount_options:
dir_mode: '0775'
file_mode: '0664'
rsync:
args:
- '--verbose'
- '--archive'
- '-z'
exclude:
- .vagrant/
- .git/
auto: 'true'
owner: www-data
group: www-data
usable_port_range:
start: 10200
stop: 10500
post_up_message: ''
ssh:
host: 'false'
port: 'false'
private_key_path: 'false'
username: vagrant
guest_port: 'false'
keep_alive: '1'
forward_agent: 'false'
forward_x11: 'false'
shell: 'bash -l'
insert_key: 'false'
vagrant:
host: detect
proxy:
http: ''
https: ''
ftp: ''
no_proxy: ''
server:
install: '1'
packages:
- vim
- composer
- git
users_groups:
install: '1'
groups: { }
users: { }
locale:
install: '1'
settings:
default_locale: es_ES.UTF-8
locales:
- en_GB.UTF-8
- en_US.UTF-8
timezone: Europe/Madrid
firewall:
install: '1'
rules: { }
cron:
install: '1'
jobs: { }
nginx:
install: '1'
settings:
default_vhost: 1
proxy_buffer_size: 128k
proxy_buffers: '4 256k'
proxy_connect_timeout: 600s
proxy_send_timeout: 600s
proxy_read_timeout: 600s
names_hash_bucket_size: 128
upstreams: { }
vhosts:
nxv_oi2pxhv8su8t:
server_name: nginx.dev
server_aliases:
- www.awesome.dev
- www.nginx.dev
www_root: /var/www/nginx
listen_port: '80'
index_files:
- index.html
- index.htm
- index.php
client_max_body_size: 1m
ssl: '1'
ssl_cert: ''
ssl_key: ''
ssl_port: '443'
ssl_protocols: ''
ssl_ciphers: ''
rewrite_to_https: '1'
spdy: '1'
locations:
nxvl_3fqbmcj47hvf:
location: /
try_files:
- $uri
- $uri/
- /index.php$is_args$args
fastcgi: ''
fastcgi_index: ''
fastcgi_split_path: ''
proxy: ''
proxy_redirect: ''
nxvl_htslqsfqqunm:
location: '~ \.php$'
try_files:
- $uri
- $uri/
- /index.php$is_args$args
fastcgi: '127.0.0.1:9000'
fastcgi_index: index.php
fastcgi_split_path: '^(.+\.php)(/.*)$'
fast_cgi_params_extra:
- 'SCRIPT_FILENAME $request_filename'
- 'APP_ENV dev'
set:
- '$path_info $fastcgi_path_info'
proxy: ''
proxy_redirect: ''
proxies: { }
apache:
install: '0'
settings:
version: 2.4
user: www-data
group: www-data
default_vhost: true
manage_user: false
manage_group: false
sendfile: 0
modules:
- proxy_fcgi
- rewrite
vhosts:
av_hyccqwe7iecr:
servername: awesome.dev
serveraliases:
- www.awesome.dev
docroot: /var/www/awesome
port: '80'
setenv:
- 'APP_ENV dev'
setenvif:
- 'Authorization "(.*)" HTTP_AUTHORIZATION=$1'
custom_fragment: ''
ssl: '0'
ssl_cert: ''
ssl_key: ''
ssl_chain: ''
ssl_certs_dir: ''
ssl_protocol: ''
ssl_cipher: ''
directories:
avd_8x23jhnbgquk:
path: /var/www/awesome
options:
- Indexes
- FollowSymlinks
- MultiViews
allow_override:
- All
require:
- 'all granted'
custom_fragment: ''
files_match:
avdfm_vmmh0bjsaqhg:
path: \.php$
sethandler: 'proxy:fcgi://127.0.0.1:9000'
custom_fragment: ''
provider: filesmatch
provider: directory
letsencrypt:
install: '1'
settings:
email: luis#luis.local
domains: { }
php:
install: '1'
settings:
version: '70'
modules:
php:
- cli
- intl
- curl
- memcached
- mysql
- mysqlnd
- imap
pear: { }
pecl: { }
ini:
display_errors: 'On'
error_reporting: '-1'
session.save_path: /var/lib/php/session
date.timezone: UTC
fpm_ini:
error_log: /var/log/php-fpm.log
fpm_pools:
phpfp_vujhdkscen9a:
ini:
prefix: www
listen: '127.0.0.1:9000'
security.limit_extensions: .php
user: www-user
group: www-data
composer: '1'
composer_home: ''
xdebug:
install: '1'
settings:
xdebug.default_enable: '1'
xdebug.remote_autostart: '0'
xdebug.remote_connect_back: '1'
xdebug.remote_enable: '1'
xdebug.remote_handler: dbgp
xdebug.remote_port: '9000'
blackfire:
install: '0'
settings:
server_id: ''
server_token: ''
agent:
http_proxy: ''
https_proxy: ''
log_file: stderr
log_level: '1'
php:
agent_timeout: '0.25'
log_file: ''
log_level: '1'
xhprof:
install: '0'
wpcli:
install: '0'
version: v0.21.1
drush:
install: '0'
version: 8.0.5
ruby:
install: '1'
versions:
rv_2odx4yt5qrex:
default: '1'
bundler: '1'
version: 1.9.3
gems:
- deep_merge
- activesupport
- vine
python:
install: '1'
packages: { }
versions: { }
nodejs:
install: '1'
settings:
version: '5'
npm_packages: { }
hhvm:
install: '0'
nightly: 0
composer: '1'
composer_home: ''
settings: { }
server_ini:
hhvm.server.host: 127.0.0.1
hhvm.server.port: '9000'
hhvm.log.use_log_file: '1'
hhvm.log.file: /var/log/hhvm/error.log
php_ini:
display_errors: 'On'
error_reporting: '-1'
date.timezone: UTC
mariadb:
install: '0'
settings:
version: '10.1'
root_password: '123'
override_options: { }
adminer: 0
users:
mariadbnu_kv8yudo3faat:
name: dbuser
password: '123'
databases:
mariadbnd_d9sigtide5ol:
name: dbname
sql: ''
grants:
mariadbng_1ksysq92bh2p:
user: dbuser
table: '*.*'
privileges:
- ALL
mysql:
install: '1'
settings:
version: '5.6'
root_password: mypassword
override_options: { }
adminer: 0
users:
mysqlnu_qrdghfnjhslr:
name: dbuser
password: '123'
databases:
mysqlnd_8ltm71pgi42q:
name: ''
sql: ''
grants:
mysqlng_i9wsnaqkcck2:
user: luis
table: '*.*'
privileges:
- ALL
postgresql:
install: '0'
settings:
global:
encoding: UTF8
version: '9.4'
server:
postgres_password: '123'
databases: { }
users: { }
grants: { }
adminer: 0
mongodb:
install: '0'
settings:
bind_ip: 127.0.0.1
port: '27017'
globals:
version: 2.6.0
databases: { }
redis:
install: '0'
settings:
port: '6379'
sqlite:
install: '0'
adminer: 0
databases: { }
mailhog:
install: '0'
settings:
smtp_ip: 0.0.0.0
smtp_port: 1025
http_ip: 0.0.0.0
http_port: '8025'
path: /usr/local/bin/mailhog
beanstalkd:
install: '0'
settings:
listenaddress: 0.0.0.0
listenport: '11300'
maxjobsize: '65535'
maxconnections: '1024'
binlogdir: /var/lib/beanstalkd/binlog
binlogfsync: null
binlogsize: '10485760'
beanstalk_console: 0
rabbitmq:
install: '0'
settings:
port: '5672'
users: { }
vhosts: { }
plugins: { }
elastic_search:
install: '0'
settings:
version: 2.3.1
java_install: true
instances:
esi_imx85v224tyv:
name: es-01
solr:
install: '0'
settings:
version: 4.10.2
port: '8984'
Any ideas what do to fix it? Or at least how to roll it back to using only Homestead?
Well I finally found the solution here:
Vagrant up error, changing ownership of /vagrant: not a directoryof-vagrant-not-a-directory
It was fixed by uninstalling Virtual Box 5 and installing VB 4.3

Error: has_key(): expects the first argument to be a hash,

I am trying to provision my vagrant box running CentOs but I keep getting the this error: Error: has_key(): expects the first argument to be a hash,
Can anyone tell me what it means and how I resolve it?
==> default: Running provisioner: shell...
default: Running: /var/folders/mr/qmf1r_317zl1ryd9dp8nj1nml2yjr7/T/vagrant-shell20151211-6577-1370bsm.sh
==> default: Running provisioner: shell...
default: Running: /var/folders/mr/qmf1r_317zl1ryd9dp8nj1nml2yjr7/T/vagrant-shell20151211-6577-19k2u5d.sh
==> default: Running provisioner: shell...
default: Running: /var/folders/mr/qmf1r_317zl1ryd9dp8nj1nml2yjr7/T/vagrant-shell20151211-6577-1ral51j.sh
==> default: Running provisioner: puppet...
==> default: Running Puppet with site.pp...
==> default: Info: Loading facts in /tmp/vagrant-puppet/modules-86824c4326e330d264f84aded5219b9a/composer/lib/facter/composer_home.rb
==> default: Info: Loading facts in /tmp/vagrant-puppet/modules-86824c4326e330d264f84aded5219b9a/concat/lib/facter/concat_basedir.rb
==> default: Info: Loading facts in /tmp/vagrant-puppet/modules-86824c4326e330d264f84aded5219b9a/firewall/lib/facter/ip6tables_version.rb
==> default: Info: Loading facts in /tmp/vagrant-puppet/modules-86824c4326e330d264f84aded5219b9a/firewall/lib/facter/iptables_persistent_version.rb
==> default: Info: Loading facts in /tmp/vagrant-puppet/modules-86824c4326e330d264f84aded5219b9a/firewall/lib/facter/iptables_version.rb
==> default: Info: Loading facts in /tmp/vagrant-puppet/modules-86824c4326e330d264f84aded5219b9a/git/lib/facter/git_exec_path.rb
==> default: Info: Loading facts in /tmp/vagrant-puppet/modules-86824c4326e330d264f84aded5219b9a/git/lib/facter/git_version.rb
==> default: Info: Loading facts in /tmp/vagrant-puppet/modules-86824c4326e330d264f84aded5219b9a/java/lib/facter/java_major_version.rb
==> default: Info: Loading facts in /tmp/vagrant-puppet/modules-86824c4326e330d264f84aded5219b9a/java/lib/facter/java_patch_level.rb
==> default: Info: Loading facts in /tmp/vagrant-puppet/modules-86824c4326e330d264f84aded5219b9a/java/lib/facter/java_version.rb
==> default: Info: Loading facts in /tmp/vagrant-puppet/modules-86824c4326e330d264f84aded5219b9a/php/lib/facter/php_fact_extension_dir.rb
==> default: Info: Loading facts in /tmp/vagrant-puppet/modules-86824c4326e330d264f84aded5219b9a/php/lib/facter/php_fact_version.rb
==> default: Info: Loading facts in /tmp/vagrant-puppet/modules-86824c4326e330d264f84aded5219b9a/puppi/lib/facter/last_run.rb
==> default: Info: Loading facts in /tmp/vagrant-puppet/modules-86824c4326e330d264f84aded5219b9a/puppi/lib/facter/puppi_projects.rb
==> default: Info: Loading facts in /tmp/vagrant-puppet/modules-86824c4326e330d264f84aded5219b9a/puppi/lib/facter/windows_common_appdata.rb
==> default: Info: Loading facts in /tmp/vagrant-puppet/modules-86824c4326e330d264f84aded5219b9a/rabbitmq/lib/facter/rabbitmq_erlang_cookie.rb
==> default: Info: Loading facts in /tmp/vagrant-puppet/modules-86824c4326e330d264f84aded5219b9a/rvm/lib/facter/rvm_installed.rb
==> default: Info: Loading facts in /tmp/vagrant-puppet/modules-86824c4326e330d264f84aded5219b9a/rvm/lib/facter/rvm_version.rb
==> default: Info: Loading facts in /tmp/vagrant-puppet/modules-86824c4326e330d264f84aded5219b9a/staging/lib/facter/staging_http_get.rb
==> default: Info: Loading facts in /tmp/vagrant-puppet/modules-86824c4326e330d264f84aded5219b9a/staging/lib/facter/staging_windir.rb
==> default: Info: Loading facts in /tmp/vagrant-puppet/modules-86824c4326e330d264f84aded5219b9a/stdlib/lib/facter/facter_dot_d.rb
==> default: Info: Loading facts in /tmp/vagrant-puppet/modules-86824c4326e330d264f84aded5219b9a/stdlib/lib/facter/pe_version.rb
==> default: Info: Loading facts in /tmp/vagrant-puppet/modules-86824c4326e330d264f84aded5219b9a/stdlib/lib/facter/puppet_vardir.rb
==> default: Info: Loading facts in /tmp/vagrant-puppet/modules-86824c4326e330d264f84aded5219b9a/stdlib/lib/facter/root_home.rb
==> default: Error: has_key(): expects the first argument to be a hash, got false which is of type FalseClass at /tmp/vagrant-puppet/manifests-893fcda21077f5a583c2dbbba8515c0a/nodes/firewall.pp:41 on node domain.local
==> default: Error: has_key(): expects the first argument to be a hash, got false which is of type FalseClass at /tmp/vagrant-puppet/manifests-893fcda21077f5a583c2dbbba8515c0a/nodes/firewall.pp:41 on node domain.local
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.
Here's my Vagrant file:
# -*- mode: ruby -*-
dir = File.dirname(File.expand_path(__FILE__))
require 'yaml'
require "#{dir}/puphpet/ruby/deep_merge.rb"
configValues = YAML.load_file("#{dir}/puphpet/config.yaml")
if File.file?("#{dir}/puphpet/config-custom.yaml")
custom = YAML.load_file("#{dir}/puphpet/config-custom.yaml")
configValues.deep_merge!(custom)
end
data = configValues['vagrantfile']
Vagrant.require_version '>= 1.6.0'
eval File.read("#{dir}/puphpet/vagrant/Vagrantfile-#{data['target']}")
And my config.yaml
vagrantfile:
target: local
vm:
box: puphpet/centos65-x64
box_url: puphpet/centos65-x64
hostname: domain.local
memory: '1024'
cpus: '1'
chosen_provider: virtualbox
network:
private_network: 192.168.56.10
forwarded_port:
vflnp_wmozbmczs2bq:
host: '6740'
guest: '22'
post_up_message: ''
provider:
virtualbox:
modifyvm:
natdnshostresolver1: 'on'
showgui: '0'
vmware:
numvcpus: 1
parallels:
cpus: 1
provision:
puppet:
manifests_path: puphpet/puppet
manifest_file: site.pp
module_path: puphpet/puppet/modules
options:
- '--verbose'
- '--hiera_config /vagrant/puphpet/puppet/hiera.yaml'
- '--parser future'
synced_folder:
vflsf_yd7pvw7djld6:
source: ./www
target: /var/www
sync_type: default
smb:
smb_host: ''
smb_username: ''
smb_password: ''
rsync:
args:
- '--verbose'
- '--archive'
- '-z'
exclude:
- .vagrant/
- .git/
auto: 'true'
owner: www-data
group: www-data
usable_port_range:
start: 10200
stop: 10500
ssh:
host: null
port: null
private_key_path: null
username: vagrant
guest_port: null
keep_alive: true
forward_agent: false
forward_x11: false
shell: 'bash -l'
vagrant:
host: detect
server:
install: '1'
packages:
- vim-common
- htop
- telnet
users_groups:
install: '1'
groups: { }
users: { }
locale:
install: '1'
settings:
default_locale: ''
locales:
- en_GB.UTF-8
- en_US.UTF-8
firewall:
install: '1'
rules: { }
cron:
install: '1'
jobs:
cj_lvl6djqwp8s0:
name: 'Magento Cronjob (Default)'
user: vagrant
command: 'php /var/www/cron.php -mdefault'
minute: '*/1'
hour: '*'
weekday: '*'
month: '*'
ixrk2utvdrnr:
monthday: ''
cj_0n3kz18p4mxl:
name: 'Magento Cronjob (Always)'
user: vagrant
command: 'php /var/www/cron.php -malways'
minute: '*/1'
hour: '*'
weekday: '*'
month: '*'
monthday: ''
nginx:
install: '1'
settings:
default_vhost: 1
proxy_buffer_size: 128k
proxy_buffers: '4 256k'
upstreams: { }
vhosts:
myvm:
server_name: my-vm.magedomain.com
www_root: /var/www/
listen_port: '80'
index_files:
- index.html
- index.php
client_max_body_size: 1m
ssl: '1'
ssl_cert: /vagrant/magedomain.cert
ssl_key: /vagrant/magenrdomain.key
ssl_port: '443'
ssl_protocols: ''
ssl_ciphers: ''
rewrite_to_https: '0'
spdy: '1'
locations:
myvm1:
location: /
autoindex: 'off'
internal: 'false'
try_files:
- $uri
- $uri/
- /index.php$is_args$args
fastcgi: ''
fastcgi_index: ''
fastcgi_split_path: ''
myvm2:
location: '~ \.php$'
autoindex: 'off'
internal: 'false'
try_files:
- $uri
- $uri/
- /index.php$is_args$args
fastcgi: '127.0.0.1:9000'
fastcgi_index: index.php
fastcgi_split_path: '^(.+\.php)(/.*)$'
fast_cgi_params_extra:
- 'SCRIPT_FILENAME $request_filename'
proxies: { }
apache:
install: '1'
settings:
user: www-data
group: www-data
default_vhost: true
manage_user: false
manage_group: false
sendfile: 0
modules:
- deflate
- expires
- headers
- info
- proxy_fcgi
- proxy
- rewrite
vhosts:
av_yy8ib55ooip9:
servername: my-vm.magedomain.com
docroot: /var/www/domain.local
port: '80'
setenv:
- 'MAGE_IS_DEVELOPER_MODE 1'
custom_fragment: ''
ssl: '0'
ssl_cert: ''
ssl_key: 'ssh'
ssl_chain: ''
ssl_certs_dir: ''
ssl_protocol: ''
ssl_cipher: ''
directories:
avd_0jq2hk9z6ud2:
path: /var/www/domain.local
options:
- Indexes
- FollowSymlinks
- MultiViews
allow_override:
- All
require:
- 'all granted'
custom_fragment: ''
files_match:
avdfm_urjoe5v1vbg9:
path: \.php$
sethandler: 'proxy:fcgi://127.0.0.1:9000'
custom_fragment: ''
provider: filesmatch
provider: directory
av_1hkh1wvj5dbl:
servername: my-vm.magedomain.com
docroot: /var/www/domain.local
port: '443'
setenv:
- 'MAGE_IS_DEVELOPER_MODE 1'
custom_fragment: ''
ssl: '0'
ssl_cert: ''
ssl_key: ''
ssl_chain: ''
ssl_certs_dir: ''
ssl_protocol: ''
ssl_cipher: ''
directories:
avd_dyxsni5u8zuk:
path: /var/www/domain.local
options:
- Indexes
- FollowSymlinks
- MultiViews
allow_override:
- All
require:
- 'all granted'
custom_fragment: ''
files_match:
avdfm_j22brvo6hoy2:
path: \.php$
sethandler: 'proxy:fcgi://127.0.0.1:9000'
custom_fragment: ''
provider: filesmatch
provider: directory
php:
install: '1'
settings:
version: '54'
modules:
php:
- cli
- intl
- mcrypt
- gd
- curl
- mysql
- tidy
- mbstring
- soap
pear: { }
pecl:
- pecl_http
ini:
display_errors: 'On'
error_reporting: '-1'
session.save_path: /var/lib/php/session
fpm_ini:
error_log: /var/log/php-fpm.log
fpm_pools: { }
composer: '1'
composer_home: ''
xdebug:
install: '1'
settings:
xdebug.default_enable: '1'
xdebug.remote_autostart: '0'
xdebug.remote_connect_back: '0'
xdebug.remote_host: 10.0.2.2
xdebug.remote_enable: '1'
xdebug.remote_handler: dbgp
xdebug.remote_port: '9000'
xdebug.idekey: PHPSTORM
blackfire:
install: '0'
settings:
server_id: ''
server_token: ''
agent:
http_proxy: ''
https_proxy: ''
log_file: stderr
log_level: '1'
php:
agent_timeout: '0.25'
log_file: ''
log_level: '1'
xhprof:
install: '0'
wpcli:
install: '0'
version: ''
drush:
install: '0'
version: 6.3.0
ruby:
install: '1'
versions:
rv_ulhh0yx00do0:
version: ''
python:
install: '1'
packages: { }
versions:
pyenv_i0cj5bnane3r:
version: 2.6.9
nodejs:
install: '0'
npm_packages:
- grunt-cli
- bower
hhvm:
install: '0'
nightly: 0
composer: '1'
composer_home: ''
settings: { }
server_ini: { }
php_ini: { }
mysql:
install: '1'
settings:
version: '5.6'
root_password: root
override_options: { }
adminer: 0
users:
mysqlnu_y57jb5rdz96u:
name: magento
password: root
databases:
mysqlnd_8qefzcbhh56c:
name: magento
sql: ''
grants:
mysqlng_oo7pkf43pn7i:
user: magento
table: 'magento.*'
privileges:
- ALL
mariadb:
install: '0'
settings:
version: '10.0'
root_password: '123'
override_options: { }
adminer: 0
users:
mariadbnu_uqqk6zprkq5l:
name: dbuser
password: '123'
databases:
mariadbnd_0fp5v72v5gls:
name: dbname
sql: ''
grants:
mariadbng_d9hlksvme32e:
user: dbuser
table: '*.*'
privileges:
- ALL
postgresql:
install: '0'
settings:
global:
encoding: UTF8
version: '9.3'
server:
postgres_password: ''
databases: { }
users: { }
grants: { }
adminer: 0
mongodb:
install: '0'
settings:
auth: 1
bind_ip: 127.0.0.1
port: '27017'
databases: { }
redis:
install: '0'
settings:
conf_port: '6379'
sqlite:
install: '0'
adminer: 0
databases: { }
mailcatcher:
install: '1'
settings:
smtp_ip: 0.0.0.0
smtp_port: 1025
http_ip: 0.0.0.0
http_port: '1080'
mailcatcher_path: /usr/local/rvm/wrappers/default
from_email_method: headers
beanstalkd:
install: '0'
settings:
listenaddress: 0.0.0.0
listenport: '13000'
maxjobsize: '65535'
maxconnections: '1024'
binlogdir: /var/lib/beanstalkd/binlog
binlogfsync: null
binlogsize: '10485760'
beanstalk_console: 0
rabbitmq:
install: '0'
settings:
port: '5672'
users: { }
vhosts: { }
plugins: { }
elastic_search:
install: '0'
settings:
version: null
java_install: true
solr:
install: '0'
settings:
version: 4.10.2
port: ''
I've been stuck for days...
Author of puphpet here.
The offending code is this:
if has_key($vm, 'ssh') and has_key($vm['ssh'], 'port') {
$vm in this context is $vm = hiera_hash('vagrantfile', {})
Per your config file, vagrantfile['ssh']['port'] both exists and is a hash as expected. Not sure why the stdlib's has_key() would complain here.
I ran your config.yaml locally and it spun up fine, with a few exceptions:
You have Apache and Nginx both set to install; PuPHPet does not support this and it will not work. You must choose one or the other.
You have an empty cron job with key ixrk2utvdrnr
You have chosen to install pecl_http - there were recent changes to this package in that another package is now required for it. I have removed this from the default suggested packages on PuPHPet and I recommend you do, too, unless you have a specific need for it. If you do, install the other requirement first. I can't remember the name of it.
You've deleted the fpm_pools block - your PHP will not parse because both Nginx and Apache use fpm, which requires pools to be set up.
You've got an empty ruby block with key rv_ulhh0yx00do0. I suggest removing it.
MySQL 5.6 support has been dropped. I highly recommend rolling back to 5.5, or using MariaDB (my choice).
MailCatcher support has been dropped in favor of MailHog, which has no dependencies.
I also noticed that you are using an older archive. The manifest_file: site.pp tipped me off. Your archive will spin up a Puppet 3.4.x box; please update your box and regenerate your archive. Puppet 4.3.1 now comes installed on new boxes.

Why 'vagrant up' cannot start a VM instance?

Im trying to launch VM via vagrant with config made by puphpet.com
Host machine: Windows 7 64
VirtualBox: 4.3.10
Vagrant: 1.7.2
The process freezes at stage: "Setting up VM name..."
If i open system process list i dont see any VBoxHeadless process
Here you can see "vagrant up --debug" log, last 30 lines:
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000
DEBUG subprocess: Exit status: 0
INFO warden: Calling IN action: #<Vagrant::Action::Builtin::HandleForwardedPortCollisions:0x26d1ad0>
DEBUG environment: Attempting to acquire process-lock: fpcollision
DEBUG environment: Attempting to acquire process-lock: dotlock
INFO environment: Acquired process lock: dotlock
INFO environment: Released process lock: dotlock
INFO environment: Acquired process lock: fpcollision
INFO handle_port_collisions: Detecting any forwarded port collisions...
DEBUG handle_port_collisions: Extra in use: []
DEBUG handle_port_collisions: Remap: {}
DEBUG handle_port_collisions: Repair: true
INFO warden: Calling IN action: #<VagrantPlugins::ProviderVirtualBox::Action::PrepareNFSValidIds:0x29cd228>
INFO subprocess: Starting process: ["C:\\Program Files\\Oracle\\VirtualBox\\VBoxManage.exe", "list", "vms"]
DEBUG subprocess: Selecting on IO
DEBUG subprocess: stdout: "vagrant_default_1431586560599_21228" {2ec4ab69-2eab-456e-80e3-c655a907b58f}
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000
DEBUG subprocess: Exit status: 0
INFO warden: Calling IN action: #<VagrantPlugins::SyncedFolderNFS::ActionCleanup:0x2a566d0>
DEBUG host: Searching for cap: nfs_prune
DEBUG host: Checking in: windows
INFO nfs: Host doesn't support pruning NFS. Skipping.
INFO warden: Calling IN action: #<Vagrant::Action::Builtin::SyncedFolderCleanup:0x332dcc0>
INFO subprocess: Starting process: ["C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\/powershell.EXE", "-NoProfile", "-ExecutionPolicy", "Bypass", "$PSVersionTable.PSVersion.Major"]
DEBUG subprocess: Selecting on IO
DEBUG subprocess: stdout: 2
And here is my puphpet config.yaml:
vagrantfile:
target: local
vm:
box: puphpet/ubuntu1404-x64
box_url: puphpet/ubuntu1404-x64
hostname: local.puphpet
memory: '512'
cpus: '1'
chosen_provider: virtualbox
network:
private_network: 192.168.56.101
forwarded_port:
vflnp_puvoa8hbnwzi:
host: '7062'
guest: '22'
post_up_message: ''
provider:
virtualbox:
modifyvm:
natdnshostresolver1: on
vmware:
numvcpus: 1
parallels:
cpus: 1
provision:
puppet:
manifests_path: puphpet/puppet
manifest_file: site.pp
module_path: puphpet/puppet/modules
options:
- '--verbose'
- '--hiera_config /vagrant/puphpet/puppet/hiera.yaml'
- '--parser future'
synced_folder:
vflsf_csg6i60dtv02:
source: ./
target: /var/www
sync_type: smb
rsync:
args:
- '--verbose'
- '--archive'
- '-z'
exclude:
- .vagrant/
- .git/
auto: 'true'
owner: www-data
group: www-data
usable_port_range:
start: 10200
stop: 10500
ssh:
host: null
port: null
private_key_path: null
username: vagrant
guest_port: null
keep_alive: true
forward_agent: false
forward_x11: false
shell: 'bash -l'
vagrant:
host: detect
server:
install: '1'
packages: { }
users_groups:
install: '1'
groups: { }
users: { }
firewall:
install: '1'
rules: { }
cron:
install: '1'
jobs: { }
nginx:
install: '0'
settings:
default_vhost: 1
proxy_buffer_size: 128k
proxy_buffers: '4 256k'
upstreams: { }
vhosts:
nxv_vqzc8icojox0:
server_name: awesome.dev
server_aliases:
- www.awesome.dev
www_root: /var/www/awesome
listen_port: '80'
index_files:
- index.html
- index.htm
- index.php
client_max_body_size: 1m
ssl: '0'
ssl_cert: ''
ssl_key: ''
ssl_port: '443'
ssl_protocols: ''
ssl_ciphers: ''
rewrite_to_https: '1'
spdy: '1'
locations:
nxvl_wx3akqxepnjx:
location: /
autoindex: off
try_files:
- $uri
- $uri/
- /index.php$is_args$args
fastcgi: ''
fastcgi_index: ''
fastcgi_split_path: ''
nxvl_qcl7gavnzbv4:
location: '~ \.php$'
autoindex: off
try_files:
- $uri
- $uri/
- /index.php$is_args$args
fastcgi: '127.0.0.1:9000'
fastcgi_index: index.php
fastcgi_split_path: '^(.+\.php)(/.*)$'
fast_cgi_params_extra:
- 'SCRIPT_FILENAME $request_filename'
- 'APP_ENV dev'
proxies: { }
apache:
install: '1'
settings:
user: www-data
group: www-data
default_vhost: true
manage_user: false
manage_group: false
sendfile: 0
modules:
- proxy_fcgi
- rewrite
vhosts:
av_kzc1192dm2tv:
servername: awesome.dev
serveraliases:
- www.awesome.dev
docroot: /var/www/awesome
port: '80'
setenv:
- 'APP_ENV dev'
custom_fragment: ''
ssl: '0'
ssl_cert: ''
ssl_key: ''
ssl_chain: ''
ssl_certs_dir: ''
ssl_protocol: ''
ssl_cipher: ''
directories:
avd_vvnbqa0dpd04:
path: /var/www/awesome
options:
- Indexes
- FollowSymlinks
- MultiViews
allow_override:
- All
require:
- 'all granted'
custom_fragment: ''
files_match:
avdfm_ib4g5nhsksoy:
path: \.php$
sethandler: 'proxy:fcgi://127.0.0.1:9000'
custom_fragment: ''
provider: filesmatch
provider: directory
php:
install: '1'
settings:
version: '56'
modules:
php:
- cli
- intl
- mcrypt
pear: { }
pecl:
- pecl_http
ini:
display_errors: On
error_reporting: '-1'
session.save_path: /var/lib/php/session
date.timezone: UTC
fpm_ini:
error_log: /var/log/php-fpm.log
fpm_pools:
phpfp_am94c5xm3dgq:
ini:
prefix: www
listen: '127.0.0.1:9000'
security.limit_extensions: .php
user: www-user
group: www-data
composer: '1'
composer_home: ''
xdebug:
install: '0'
settings:
xdebug.default_enable: '1'
xdebug.remote_autostart: '0'
xdebug.remote_connect_back: '1'
xdebug.remote_enable: '1'
xdebug.remote_handler: dbgp
xdebug.remote_port: '9000'
blackfire:
install: '0'
settings:
server_id: ''
server_token: ''
agent:
http_proxy: ''
https_proxy: ''
log_file: stderr
log_level: '1'
php:
agent_timeout: '0.25'
log_file: ''
log_level: '1'
xhprof:
install: '0'
wpcli:
install: '0'
version: v0.19.0
drush:
install: '0'
version: 6.3.0
ruby:
install: '1'
versions: { }
python:
install: '1'
packages: { }
versions: { }
nodejs:
install: '1'
npm_packages:
- bower
hhvm:
install: '0'
nightly: 0
composer: '1'
composer_home: ''
settings: { }
server_ini:
hhvm.server.host: 127.0.0.1
hhvm.server.port: '9000'
hhvm.log.use_log_file: '1'
hhvm.log.file: /var/log/hhvm/error.log
php_ini:
display_errors: On
error_reporting: '-1'
date.timezone: UTC
mysql:
install: '1'
settings:
version: '5.6'
root_password: '123'
override_options: { }
adminer: 0
users: { }
databases: { }
grants: { }
postgresql:
install: '0'
settings:
global:
encoding: UTF8
version: '9.3'
server:
postgres_password: '123'
databases: { }
users: { }
grants: { }
adminer: 0
mongodb:
install: '0'
settings:
auth: 1
bind_ip: 127.0.0.1
port: '27017'
databases: { }
redis:
install: '0'
settings:
conf_port: '6379'
sqlite:
install: '0'
adminer: 0
databases: { }
mailcatcher:
install: '1'
settings:
smtp_ip: 0.0.0.0
smtp_port: 1025
http_ip: 0.0.0.0
http_port: '1080'
mailcatcher_path: /usr/local/rvm/wrappers/default
from_email_method: inline
beanstalkd:
install: '0'
settings:
listenaddress: 0.0.0.0
listenport: '13000'
maxjobsize: '65535'
maxconnections: '1024'
binlogdir: /var/lib/beanstalkd/binlog
binlogfsync: null
binlogsize: '10485760'
beanstalk_console: 0
binlogdir: /var/lib/beanstalkd/binlog
rabbitmq:
install: '1'
settings:
port: '5672'
users: { }
vhosts: { }
plugins: { }
elastic_search:
install: '0'
settings:
version: 1.4.1
java_install: true
solr:
install: '0'
settings:
version: 4.10.2
port: '8984'
Cnange sync_type: smb to sync_type: default in synced_folder: section, also update powershell
Looks like some Vagrant Ruby script damaged another script.
I have completely removed Vagrant app and reinstalled it - everything became OK again

Vagrant/puPHPet server works for a few minutes then stops responding

I've created a Vagrant/puPHPet server which starts up fine and I can browse to the web server and access MySQL through Adminer -- for a few minutes. Then I get connection time-out errors and am forced to vagrant halt and vagrant up again. This server was working great until, for some reason, I started getting session errors which caused me to vagrant destroy and rebuild.
Curiously, I can still ping the domain name (which I've mapped locally using my hosts file) and I can also vagrant ssh into the box as needed. Furthermore, I can access the /var/www/html/index.html page by browsing to the IP address, indicating that Apache is actually running properly.
Here's my config.yaml:
---
vagrantfile-local:
vm:
box: puphpet/centos65-x64
box_url: puphpet/centos65-x64
hostname: ''
memory: '1024'
cpus: '1'
chosen_provider: vmware_fusion
network:
private_network: 172.16.44.130
forwarded_port:
NGb9G9AKiieA:
host: '7105'
guest: '22'
post_up_message: ''
provider:
virtualbox:
modifyvm:
natdnshostresolver1: on
vmware:
numvcpus: 1
parallels:
cpus: 1
provision:
puppet:
manifests_path: puphpet/puppet
manifest_file: site.pp
module_path: puphpet/puppet/modules
options:
- '--verbose'
- '--hiera_config /vagrant/puphpet/puppet/hiera.yaml'
- '--parser future'
synced_folder:
OLYbzo4krRFL:
owner: www-data
group: www-data
source: '/Users/Sean/Documents/Websites/RE Lynx Git'
target: /var/www/relynx.dev/public_html
sync_type: default
rsync:
args:
- '--verbose'
- '--archive'
- '-z'
exclude:
- .vagrant/
auto: 'false'
v2MPTOQwLJ9t:
owner: www-data
group: www-data
source: '/Users/Sean/Documents/Websites/Trouble Ticket v3'
target: /var/www/troubleticket.dev/public_html
sync_type: default
rsync:
auto: 'false'
usable_port_range:
start: 10200
stop: 10500
ssh:
host: null
port: null
private_key_path: null
username: vagrant
guest_port: null
keep_alive: true
forward_agent: false
forward_x11: false
shell: 'bash -l'
vagrant:
host: detect
server:
install: '1'
packages: { }
users_groups:
install: '1'
groups: { }
users: { }
cron:
install: '1'
jobs: { }
firewall:
install: '1'
rules: { }
apache:
install: '1'
settings:
user: www-data
group: www-data
default_vhost: true
manage_user: false
manage_group: false
sendfile: 0
modules:
- rewrite
vhosts:
imc73bzqik3f:
servername: relynx.dev
serveraliases:
- www.relynx.dev
docroot: /var/www/relynx.dev/public_html
port: '80'
setenv:
- 'APP_ENV dev'
directories:
1qhlbhns5682:
provider: directory
path: /var/www/relynx.dev/public_html
options:
- Indexes
- FollowSymlinks
- MultiViews
allow_override:
- All
require:
- all
- granted
custom_fragment: ''
engine: php
custom_fragment: ''
ssl_cert: ''
ssl_key: ''
ssl_chain: ''
ssl_certs_dir: ''
iawfvimtqhj3:
servername: troubleticket.dev
serveraliases:
- www.troubleticket.dev
docroot: /var/www/troubleticket.dev/public_html
port: '80'
directories:
nzkzsjt6eeuh:
provider: directory
path: ''
options:
- Indexes
- FollowSymlinks
- MultiViews
allow_override:
- All
require:
- all
- granted
custom_fragment: ''
engine: php
custom_fragment: ''
ssl_cert: ''
ssl_key: ''
ssl_chain: ''
ssl_certs_dir: ''
mod_pagespeed: 0
nginx:
install: '0'
settings:
default_vhost: 1
proxy_buffer_size: 128k
proxy_buffers: '4 256k'
upstreams: { }
vhosts:
risjadwc5osq:
proxy: ''
server_name: awesome.dev
server_aliases:
- www.awesome.dev
www_root: /var/www/awesome
listen_port: '80'
location: \.php$
index_files:
- index.html
- index.htm
- index.php
envvars:
- 'APP_ENV dev'
engine: php
client_max_body_size: 1m
ssl_cert: ''
ssl_key: ''
php:
install: '1'
version: '56'
composer: '1'
composer_home: ''
modules:
php:
- cli
- intl
- mcrypt
pear: { }
pecl:
- pecl_http
ini:
display_errors: On
error_reporting: '-1'
session.save_path: /var/lib/php/session
timezone: America/Chicago
mod_php: 0
hhvm:
install: '0'
nightly: 0
composer: '1'
composer_home: ''
settings:
host: 127.0.0.1
port: '9000'
ini:
display_errors: On
error_reporting: '-1'
timezone: null
xdebug:
install: '0'
settings:
xdebug.default_enable: '1'
xdebug.remote_autostart: '0'
xdebug.remote_connect_back: '1'
xdebug.remote_enable: '1'
xdebug.remote_handler: dbgp
xdebug.remote_port: '9000'
xhprof:
install: '0'
wpcli:
install: '0'
version: v0.17.1
drush:
install: '0'
version: 6.3.0
ruby:
install: '1'
versions: { }
nodejs:
install: '0'
npm_packages: { }
python:
install: '1'
packages: { }
versions: { }
mysql:
install: '1'
settings:
override_options: { }
root_password: **REMOVED**
adminer: '1'
databases:
9pj8tSwHkENO:
grant:
- ALL
name: **REMOVED**
host: localhost
user: **REMOVED**
password: '**REMOVED**'
sql_file: /var/www/relynx.dev/public_html/rladmin_rladmin_2.sql
BHfYQJD10FjP:
grant:
- ALL
name: **REMOVED**
host: localhost
user: **REMOVED**
password: '**REMOVED**'
sql_file: /var/www/relynx.dev/public_html/rladmin_rlhpsi_2.sql
postgresql:
install: '0'
settings:
root_password: '123'
user_group: postgres
encoding: UTF8
version: '9.3'
databases: { }
adminer: 0
mariadb:
install: '0'
settings:
override_options: { }
root_password: '123'
version: '10.0'
adminer: 0
databases: { }
sqlite:
install: '0'
adminer: 0
databases: { }
mongodb:
install: '0'
settings:
auth: 1
port: '27017'
databases: { }
redis:
install: '0'
settings:
conf_port: '6379'
mailcatcher:
install: '0'
settings:
smtp_ip: 0.0.0.0
smtp_port: 1025
http_ip: 0.0.0.0
http_port: '1080'
mailcatcher_path: /usr/local/rvm/wrappers/default
from_email_method: inline
beanstalkd:
install: '0'
settings:
listenaddress: 0.0.0.0
listenport: '13000'
maxjobsize: '65535'
maxconnections: '1024'
binlogdir: /var/lib/beanstalkd/binlog
binlogfsync: null
binlogsize: '10485760'
beanstalk_console: 0
binlogdir: /var/lib/beanstalkd/binlog
rabbitmq:
install: '0'
settings:
port: '5672'
elastic_search:
install: '0'
settings:
version: 1.4.1
java_install: true
solr:
install: '0'
settings:
version: 4.10.2
port: '8984'
Honestly with issues like this and not knowing enough about vagrant etc I would recommend you just start from scratch and use PuPHPet to rebuild a new file. It will resolve these issues and any other ones that may arise.
Also make sure all relevant software is up to date.

Setting proper vagrant documentroot

how to set proper document root for vagrant. Now it takes docroot from the wrong place. I'm trying to run laravel project, so it has to be not /var/www/project but /vae/www/project/public...
My YAML file:
---
vagrantfile-local:
vm:
box: puphpet/debian75-x64
box_url: puphpet/debian75-x64
hostname: ''
memory: '512'
cpus: '1'
chosen_provider: virtualbox
network:
private_network: 192.168.56.101
forwarded_port:
1ztIcBOBAG3R:
host: '7958'
guest: '22'
post_up_message: ''
provider:
virtualbox:
modifyvm:
natdnshostresolver1: on
vmware:
numvcpus: 1
parallels:
cpus: 1
provision:
puppet:
manifests_path: puphpet/puppet
manifest_file: site.pp
module_path: puphpet/puppet/modules
options:
- '--verbose'
- '--hiera_config /vagrant/puphpet/puppet/hiera.yaml'
- '--parser future'
synced_folder:
2jsmp5Xo8wAe:
owner: www-data
group: www-data
source: 'C:\\Users\\Vygandas\\Documents\\git\\project.x\\web'
target: /var/www/projectx
sync_type: default
rsync:
args:
- '--verbose'
- '--archive'
- '-z'
exclude:
- .vagrant/
auto: 'false'
usable_port_range:
start: 10200
stop: 10500
ssh:
host: null
port: null
private_key_path: null
username: vagrant
guest_port: null
keep_alive: true
forward_agent: false
forward_x11: false
shell: 'bash -l'
vagrant:
host: detect
server:
install: '1'
packages: { }
users_groups:
install: '1'
groups: { }
users: { }
cron:
install: '1'
jobs: { }
firewall:
install: '1'
rules: null
apache:
install: '1'
settings:
user: www-data
group: www-data
default_vhost: true
manage_user: false
manage_group: false
sendfile: 0
modules:
- rewrite
vhosts:
495wa1uc3p0z:
servername: projectx.dev
serveraliases:
- www.projectx.dev
docroot: /var/www/projectx/public
port: '80'
setenv:
- 'APP_ENV dev'
directories:
8yngfatheg7u:
provider: directory
path: /var/www/projectx/public
options:
- Indexes
- FollowSymlinks
- MultiViews
allow_override:
- All
require:
- all
- granted
custom_fragment: ''
engine: php
custom_fragment: ''
ssl_cert: ''
ssl_key: ''
ssl_chain: ''
ssl_certs_dir: ''
mod_pagespeed: 0
nginx:
install: '0'
settings:
default_vhost: 1
proxy_buffer_size: 128k
proxy_buffers: '4 256k'
upstreams: { }
vhosts:
ksovqgz8jsgn:
proxy: ''
server_name: awesome.dev
server_aliases:
- www.awesome.dev
www_root: /var/www/awesome
listen_port: '80'
location: \.php$
index_files:
- index.html
- index.htm
- index.php
envvars:
- 'APP_ENV dev'
engine: php
client_max_body_size: 1m
ssl_cert: ''
ssl_key: ''
php:
install: '1'
version: '56'
composer: '1'
composer_home: ''
modules:
php:
- cli
- intl
- mcrypt
- gd
- imagick
- mysql
pear: { }
pecl:
- pecl_http
ini:
display_errors: On
error_reporting: '-1'
session.save_path: /var/lib/php/session
timezone: America/Chicago
mod_php: 0
hhvm:
install: '0'
nightly: 0
composer: '1'
composer_home: ''
settings:
host: 127.0.0.1
port: '9000'
ini:
display_errors: On
error_reporting: '-1'
timezone: null
xdebug:
install: '0'
settings:
xdebug.default_enable: '1'
xdebug.remote_autostart: '0'
xdebug.remote_connect_back: '1'
xdebug.remote_enable: '1'
xdebug.remote_handler: dbgp
xdebug.remote_port: '9000'
xhprof:
install: '0'
wpcli:
install: '0'
version: v0.17.1
drush:
install: '0'
version: 6.3.0
ruby:
install: '1'
versions:
gA1kSNQgqjbS:
version: ''
nodejs:
install: '0'
npm_packages: { }
python:
install: '1'
packages: { }
versions:
S0v3NX4H3glU:
version: ''
mysql:
install: '1'
override_options: { }
root_password: '123'
adminer: 0
databases:
3kES6Zw0Brtz:
grant:
- ALL
name: projectx
host: localhost
user: projectxuser
password: '123'
sql_file: ''
postgresql:
install: '0'
settings:
root_password: '123'
user_group: postgres
encoding: UTF8
version: '9.3'
databases: { }
adminer: 0
mariadb:
install: '0'
override_options: { }
root_password: '123'
adminer: 0
databases: { }
version: '10.0'
sqlite:
install: '0'
adminer: 0
databases: { }
mongodb:
install: '0'
settings:
auth: 1
port: '27017'
databases: { }
redis:
install: '0'
settings:
conf_port: '6379'
mailcatcher:
install: '1'
settings:
smtp_ip: 0.0.0.0
smtp_port: 1025
http_ip: 0.0.0.0
http_port: '1080'
mailcatcher_path: /usr/local/rvm/wrappers/default
from_email_method: inline
beanstalkd:
install: '0'
settings:
listenaddress: 0.0.0.0
listenport: '13000'
maxjobsize: '65535'
maxconnections: '1024'
binlogdir: /var/lib/beanstalkd/binlog
binlogfsync: null
binlogsize: '10485760'
beanstalk_console: 0
binlogdir: /var/lib/beanstalkd/binlog
rabbitmq:
install: '0'
settings:
port: '5672'
elastic_search:
install: '1'
settings:
version: 1.4.1
java_install: true
solr:
install: '0'
settings:
version: 4.10.2
port: '8984'
I can access it only via http://projectx.dev/public ... Plz help me O_o
I can see you have:
vhosts:
495wa1uc3p0z:
servername: projectx.dev
serveraliases:
- www.projectx.dev
docroot: /var/www/projectx/public
port: '80'
setenv:
- 'APP_ENV dev'
directories:
8yngfatheg7u:
provider: directory
path: /var/www/projectx/public
options:
- Indexes
- FollowSymlinks
- MultiViews
allow_override:
- All
require:
- all
- granted
custom_fragment: ''
engine: php
custom_fragment: ''
ssl_cert: ''
ssl_key: ''
ssl_chain: ''
ssl_certs_dir: ''
Which tells me you probably started with /var/www/projectx, ran $ vagrant up, changed /var/www/projectx to /var/www/projectx/public and didn't do a $ vagrant provision to apply the changes.
It was right that I needed to run "vagran provision" after modifications, but another thing that config should look like this
vhosts:
495wa1uc3p0z:
servername: projectx.dev
docroot: /var/www/projectx/public
port: '80'
setenv:
- 'APP_ENV dev'
directories:
495wa1uc3p0z:
provider: directory
path: /var/www/projectx/public
options:
- Indexes
- FollowSymlinks
- MultiViews
allow_override:
- All
allow:
- All
custom_fragment: ''

Resources