Laravel Homestead:Nginx无法在Vagrant上启动.需要root密码才能访问Nginx日志 [英] Laravel Homestead: Nginx failing to start on Vagrant. Need root password to access Nginx logs

查看:78
本文介绍了Laravel Homestead:Nginx无法在Vagrant上启动.需要root密码才能访问Nginx日志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Laravel Homestead与Laravel 4一起工作.今天早晨,无家可归后,我无法访问homestead.app:8000.我没有问题地对其进行ping操作,因此我调查了我的virtualbox,发现Nginx没有启动.然后,我尝试查看日志,并拒绝了 www-data adm 拥有的/var/log/nginx目录中的权限.

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.

那么我的问题是,允许我访问该目录的 su sudo 密码是什么?该文档令人惊讶地没有任何信息以及Homestead.app Git存储库.谢谢.

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.

推荐答案

跳转到root帐户外壳的一种快速方法是运行"sudo bash"命令.这样,如果您不必在每个命令前面都键入"sudo".由于此虚拟机仅用于开发目的,因此我认为它没有危险,但是在实际生产中,Ubuntu会在root用户帐户已锁定的情况下运行,因此您始终应进入并应保持用户级特权,直到需要执行更高级别的权限为止命令.您可以启用" root帐户并设置密码,但是使用sudo跳转到它是更好的方法.

A quick way to jump to a root account shell is to run the "sudo bash" command. That way, if you don't have to have to type "sudo" in front of each command. Since this VM is for development purposes I don't see it as a danger, but in real production Ubuntu runs with the root account locked down so you always go in and should stay in with user level privileges until you need to execute a higher level command. You "can" enable the root account and set a password, but jumping to it with sudo is the better method.

这篇关于Laravel Homestead:Nginx无法在Vagrant上启动.需要root密码才能访问Nginx日志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆