Laravel Homestead: Nginx cannot start with Vagrant. Need root password to access Nginx logs

Using Laravel Homestead to work with Laravel 4. After I started this morning, I was unable to access homestead.app:8000. I did not notice any problems, so I examined my virtual box and found that Nginx did not start. Then I tried to look at the logs and was denied permission from the / var / log / nginx directory, which belongs to www-data adm .

My question is, what is su or sudo password that will allow me to access this directory? The documentation is surprisingly devoid of any information, as well as the Homestead.app Git repository. Thank.

+4
source share
4 answers

A quick way to navigate to the root root account is to run the "sudo bash" command. Thus, if you do not need to enter "sudo" before each command. Since this virtual machine is designed for development, I don’t see it as a danger, but in real production Ubuntu works with the root account, so you always turn on and must remain in user level privileges until you need to execute a higher level command . You can “enable” the root account and set a password, but the best way is to go to it using sudo.

+5
source

laravel/homestead vagrant, nginx - . nginx -t :

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

, sites_available:

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

: service nginx restart

+8

, sudo -s

+6

, root. : sudo nano, root. - , .

root, Google, .

0

Source: https://habr.com/ru/post/1545698/


All Articles