Reputation: 8113
I'm new to app development, new to Laravel and new to Homestead. I've just successfully served up my first 'hello world' home page via Vagrant/Homestead.
I have a few of questions:
Assuming my config is the following:
folders:
- map: ~/Documents/projects/tests
to: /home/vagrant/tests
sites:
- map: test1.local
to: /home/vagrant/tests/laravel1/HTML/public
Where the is the /home/vagrant/tests
folder physically located? Or, where can I find this kind of info (apart from here)?
I started the server with vagrant up
. Ok. I see no logs on the Terminal. I was used to have logs during requests. So will the server run forever and ever? Or how to eventually shut it down?
Upvotes: 1
Views: 2301
Reputation: 7111
~/Documents/projects/tests
on host OS and ~/tests/laravel1/HTML
in guest OSvagrant halt
(from same directory where you issued vagrant up
)/var/log/apache2/access.log
and /var/log/apache2/error.log
by default. Application (PHP error within) you can see in (in your case) /home/vagrant/tests/laravel1/HTML/storage/logs/laravel.log
Not asked how but
vagrant ssh
commandUpvotes: 1
Reputation: 9843
Where the hell is
/home/vagrant/tests folder
physically located? Or, where can I find this kind of info (apart from here)?
The /home/vagrant
folder is stored in the virtual hard disk of the virtual machine. You cannot access it from your host OS.
On my computer, it's located in ~/.vagrant.d/boxes/laravel-VAGRANTSLASH-homestead/5.1.0/virtualbox/ubuntu-16.04-amd64-disk001.vmdk
. It may differ on your machine.
It doesn't matter where that directory is though, because the real files are stored in the ~/Documents/Projects/tests
directory which is mapped to the virtual hard disk. Any changes that you need to make to these files, you should be making in that directory.
I started the server with
vagrant up
. Ok. I see no logs on the Terminal. I was used to have logs during requests. So will the server run forever and ever? Or how to eventually shut it down?
The machine will run until it's stopped, using vagrant halt
or you shut down your machine.
How to see logs?
Laravel stores your logs in storage/logs
within the Laravel directory. Based on your configuration, you should have log files in the ~/Documents/projects/tests/Laravel1/HTML/storage/logs
directory.
Upvotes: 1
Reputation: 13697
It’s on your VM, so it’s inside the VM’s directroy. Depending on what VM you’re using, it’ll be in there.
The oposite of vagrant up
is vagrant halt
Upvotes: 1