简体   繁体   English

Nginx 无法启动,因为我犯了一个错误,不知道如何反转它

[英]Nginx will not start because I made a mistake and don't know how to reverse it

I am following this tutorial in order to learn how to deploy flask-react applications from a singe nginx server, but I made the mistake of trying this command: $ sudo ln -s /etc/nginx/sites-available/react-flask-app.nginx /etc/nginx/sites-enabled/react-flask-app.nginx , but it happens that my file has no nginx extension, so the command should have been $ sudo ln -s /etc/nginx/sites-available/react-flask-app /etc/nginx/sites-enabled/react-flask-app .我正在关注本教程,以了解如何从单个 nginx 服务器部署烧瓶反应应用程序,但我在尝试此命令时犯了错误: $ sudo ln -s /etc/nginx/sites-available/react-flask-app.nginx /etc/nginx/sites-enabled/react-flask-app.nginx , but it happens that my file has no nginx extension, so the command should have been $ sudo ln -s /etc/nginx/sites-available/react-flask-app /etc/nginx/sites-enabled/react-flask-app Now nginx refuses to start with command sudo systemctl start nginx , and command systemctl status nginx.service returns the following:现在 nginx 拒绝使用命令sudo systemctl start nginx ,命令systemctl status nginx.service返回以下内容:

Dec 14 16:32:21 ip-172-31-5-99 systemd[1]: Starting A high performance web server and a reverse proxy server...
Dec 14 16:32:21 ip-172-31-5-99 nginx[2017]: nginx: [emerg] open() "/etc/nginx/sites-enabled/react-flask-app.nginx" failed (2: No such file or directory) in /etc/nginx/nginx.conf:62
Dec 14 16:32:21 ip-172-31-5-99 nginx[2017]: nginx: configuration file /etc/nginx/nginx.conf test failed
Dec 14 16:32:21 ip-172-31-5-99 systemd[1]: nginx.service: Control process exited, code=exited status=1
Dec 14 16:32:21 ip-172-31-5-99 systemd[1]: nginx.service: Failed with result 'exit-code'.
Dec 14 16:32:21 ip-172-31-5-99 systemd[1]: Failed to start A high performance web server and a reverse proxy server.

I don't know how to instruct nginx to forget about that file, I already stopped, started and reloaded nginx.我不知道如何指示 nginx 忘记那个文件,我已经停止、启动并重新加载了 nginx。

I found that a file with the name react-flask-app.nginx was created in /etc/nginx/sites-enabled , and such file contains the error message.我发现在/etc/nginx/sites-enabled中创建了一个名为react-flask-app.nginx的文件,并且该文件包含错误消息。 I only deleted the file and everything went back to normal.我只删除了文件,一切恢复正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Wildfly Java 使用 Nginx 作为反向代理的应用程序不加载 UI - Wildfly Java Application with Nginx as Reverse Proxy don't load UI 谷歌云错误地重新安装了nginx,我该如何还原它 - google cloud reinstalled nginx by mistake how i can revert it back 不知道如何构建任务'rails' - Don't know how to build task 'rails' 我从源代码安装了 GCC 5.2,但我不知道如何在 Ubuntu 15.04 上卸载它 - I installed GCC 5.2 from source and I don't know how to uninstall it on Ubuntu 15.04 我不知道在多线程情况下如何从终端获取订单 - I don't know how to get orders from the terminal in a multithread situation 我不知道我在用什么版本的Ruby - I don't know what verision of Ruby I am using 如何克隆我不知道所用版本控制系统的存储库? - How to clone a repository for which i don't know the version control system used? 当我不知道显式链接时如何通过终端下载文件? - How to download a file over terminal when I don't know the explicit link? 如何使用 nginx 作为与 Golang 一起的反向代理? - How do I use nginx as a reverse proxy alongside Golang? Python 2:线程停止运行,我不知道为什么 - Python 2: Thread stops running and I don't know why
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM