Where is the nginx error log in Laravel Homestead

To see Nginx errors in a virtual machine created with Homestead you have to do this:

You enter the installation folder of the Homestead machine:

CD Homestead

(Of course you will have to put the name of the folder that you have)

Now you enter the virtual machine:

vagrant ssh

Then you access the location of the Nginx logs, which is the standard in any Nginx server, at least in Ubuntu servers.

cd /var/log/nginx/

Now you find a set of logs. Some of them must have the log you need, you can see the log file by the log modification date, which must be recent. The file may vary depending on the application you are running… for example to view the contents of the latest logs you could write something like:

tail example.test-error.log -n 400

  • That’s assuming your application domain is example.test
  • The “-n 400” flag is to show you the last 400 lines of the log file, just in case it’s too big.
See also  Working with branches in Git: git branch
Loading Facebook Comments ...
Loading Disqus Comments ...