ubuntu - Nginx 安装后未启动 [emerg] open() "/etc/nginx/nginx.conf"failed (2 : No such file

标签 ubuntu nginx

在 Ubuntu 上安装 Nginx 后,它没有启动。我不知道发生了什么。我尝试自己创建 nginx.conf 但没有发生任何变化

    ● nginx.service - A high performance web server and a reverse proxy server
   Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2021-01-08 15:12:18 UTC; 1min 49s ago
     Docs: man:nginx(8)

Jan 08 15:12:18 root systemd[1]: Starting A high performance web server and a reverse proxy server...
Jan 08 15:12:18 root nginx[3367]: nginx: [emerg] open() "/etc/nginx/nginx.conf" failed (2: No such file or d
Jan 08 15:12:18 root nginx[3367]: nginx: configuration file /etc/nginx/nginx.conf test failed
Jan 08 15:12:18 root systemd[1]: nginx.service: Control process exited, code=exited status=1
Jan 08 15:12:18 root systemd[1]: nginx.service: Failed with result 'exit-code'.
Jan 08 15:12:18 root systemd[1]: Failed to start A high performance web server and a reverse proxy server.

最佳答案

我不知道,但是在我从 this link 复制/etc/nginx 中的 nginx.conf 和 mime.types 后它可以工作。 .谢谢@丹尼尔梅萨

关于ubuntu - Nginx 安装后未启动 [emerg] open() "/etc/nginx/nginx.conf"failed (2 : No such file,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65631703/

相关文章:

Docker 系统尚未使用 systemd 作为 init 系统启动

c++ - 我无法使用 Code::Blocks 编译任何东西

nginx - 如何编辑 nginx.conf 以增加上传文件大小

SSL 错误 : OCSP_basic_verify() failed

angular - 无响应:无法通过dockerize和运行angular app

ubuntu - 在 Ubuntu 中很难将数学和 GSL 联系起来

ubuntu - Artifactory + 18.04 artifactoryManage.sh 不创建 PID 文件

php - 需要时区调试帮助

nginx - 接收 HLS 流并重播

python - Gunicorn 和 Flask 蓝图