[英]error on start nginx service on ubuntu vps
i am begginer user of vps, i have a reactJS app, and i wnat to deploy it on my ubuntu 18 vps with nginx. 我是vps的初学者用户,我有一个reactJS应用程序,我使用nginx将其部署在我的ubuntu 18 vps上。 I have followed the stpes of this tutorial Deploying create-react-app with Nginx and Ubuntu
我遵循了本教程的步骤, 使用Nginx和Ubuntu部署create-react-app
i had already check all the steps, but when i put the command 我已经检查了所有步骤,但是当我输入命令时
sudo service nginx start
sudo服务nginx启动
the system show's me, the next error message: 系统显示我,下一条错误消息:
Job for nginx.service failed because the control process exited with error code.
nginx.service的作业失败,因为控制进程退出并显示错误代码。 See "systemctl status nginx.service" and "journalctl -xe" for details.
有关详细信息,请参见“ systemctl status nginx.service”和“ journalctl -xe”。
and when i put "journalctl -xe" shows me this: 当我输入“ journalctl -xe”时,向我显示:
please help me friends 请帮我朋友
Look in your log file on messages before the error "Failed to startup nginx" 在错误“无法启动nginx失败”之前,在消息的日志文件中查找
You will see the reason of problem. 您将看到问题的原因。 bind() to 0.0.0.0:80 failed (98: Address already in use)
将bind()设置为0.0.0.0:80失败(98:地址已在使用中)
Looks like port 80 on your vps server is already in use by some application. 看起来您的vps服务器上的端口80已被某些应用程序占用。 Port 80 used for HTTP services.
用于HTTP服务的端口80。
So most likely you already have run Apache HTTP server, or some other. 因此,很可能您已经在运行Apache HTTP服务器或其他服务器。
use this command to see what application use it 使用此命令查看使用什么应用程序
sudo netstat -tulpn | grep ":80"
If you see apache 如果看到apache
tcp6 0 0 :::80 :::* LISTEN 349/apache2
then you can stop apache 那你就可以停止阿帕奇
# apache service name also can be httpd (use right command)
# sudo service httpd stop
sudo service apache stop
and run nginx 并运行nginx
sudo service nginx start
But you should be sure that you don't use apache for another website. 但是,您应该确保不要将apache用于其他网站。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.