Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel Homestead: Nginx failing to start on Vagrant. Need root password to access Nginx logs

Using Laravel Homestead to work with Laravel 4. After running vagrant up this morning, I was unable to access homestead.app:8000. I pinged it with no problem so I investigated my virtualbox and discovered that Nginx wasn't starting. I then attempted to view logs and I am denied permission from the /var/log/nginx directory which is owned by www-data adm.

My question then, what is the su or sudo password which would allow me to access that directory? The documentation is surprisingly void of any information as well as the Homestead.app Git repository. Thank you.

like image 582
sparecycle Avatar asked Nov 28 '22 15:11

sparecycle


1 Answers

i had similar issue with laravel/homestead vagrant virtual machine and nginx not restarting. the error after running nginx -t was :

nginx: [crit] pread() "/etc/nginx/sites-enabled/sites-available" failed (21: Is a directory)
nginx: configuration file /etc/nginx/nginx.conf test failed

solution was to delete the symbolic link sites_available:

rm -Rf /etc/nginx/sites-enabled/sites-available

than it worked: service nginx restart

like image 60
ulkas Avatar answered Dec 04 '22 02:12

ulkas