Current homestead requires virtualbox 5.2 and vagrant 2.0.
How to enable Nginx Access Log on Laravel Homestead?
Hi Guys,
I'm using laravel/homestead (virtualbox, 3.1.0), and there is a way to enable the Nginx access log?
The access.log file did exist in the /var/log/nginx directory, but it empty and not logging anything.
I believe the question was how to enable acces log.
This is quite easy; ssh into your homestead box (vagrant ssh) Then navigate to /etc/nginx/sites-available/
Here you should see a file with the name of the provisioned site you want to enable access logging for.
For example: test.com
You should do: sudo nano test.com (or use an editor you prefer).
Somewhere in the file you should see something like this:
access_log off;
error_log /var/log/nginx/test.com-error.log error;
change this to:
access_log /var/log/nginx/test.com-access.log;
error_log /var/log/nginx/test.com-error.log error;
Hit save (in nano: ctrl +x and Y and enter) Then, back in your terminal, type: sudo service nginx restart
Voila, all set, your access logging is now enabled for this domain!
Please or to participate in this conversation.