Linux nginx不带sudo运行或自动输入密码don';我不需要进去
我尝试~/nginx/sbin/nginx,得到这个消息:Linux nginx不带sudo运行或自动输入密码don';我不需要进去,linux,nginx,Linux,Nginx,我尝试~/nginx/sbin/nginx,得到这个消息: nginx: [warn] the "user" directive makes sense only if the master process runs with super- user privileges, ignored in /home/zxr/nginx/conf/nginx.conf:2 nginx: [emerg] open() "/home/zxr/nginx/logs/access.log" failed
nginx: [warn] the "user" directive makes sense only if the master process runs with super- user privileges, ignored in /home/zxr/nginx/conf/nginx.conf:2
nginx: [emerg] open() "/home/zxr/nginx/logs/access.log" failed (13: Permission denied)
因此,我是否可以在不使用sudo的情况下运行nginx,或者自动输入passwd?如果您希望nginx绑定端口80,则必须使用超级用户来运行nginx
您可以在不使用
sudo
的情况下运行nginx,但它不能绑定1024以下的端口,并确保用户具有访问数据的权限,例如:/home/zxr/nginx/logs/
当我重新启动vps时,我只是在nginx上自动运行。
sudo$HOME/nginx/sbin/nginx
$ sudo update-rc.d nginx default
$ sudo reboot
$ google-chrome http://localhost
如果你看到
欢迎来到nginx!
如果您看到此页面,则表明nginx web服务器已成功安装并正常工作。需要进一步配置
有关在线文档和支持,请参阅nginx.org。
可在nginx.com上获得商业支持
感谢您使用nginx
它可以工作是的,您可以使用sudo运行nginx