gpt4 book ai didi

nginx - 启动失败 nginx HTTP 和反向代理服务器问题

转载 作者:行者123 更新时间:2023-12-03 20:22:27 25 4
gpt4 key购买 nike

我第一次在我的 Fedora 24 中停止 nginx 服务器。我使用 apache 服务器进行开发。对于 onlyoffice 集成,我必须安装 nginx 服务器。我使用此命令安装了 nginx 服务器 dnf install nginx
在启动 nginx 服务器之前,我停止了 apache 并禁用了它,如下所示。

systemctl stop httpd
systemctl disable httpd

如果我启动 nginx 服务器 sudo service nginx start我得到低于错误。
Redirecting to /bin/systemctl start  nginx.service
Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.

所以我跑了 systemctl status nginx.service命令了解问题详细信息,我在终端中得到以下输出。
[root@localhost ~]# systemctl -l status nginx.service
● nginx.service - The nginx HTTP and reverse proxy server
Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2016-10-20 01:45:57 IST; 10s ago
Process: 10719 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=1/FAILURE)
Process: 10709 ExecStartPre=/usr/bin/rm -f /run/nginx.pid (code=exited, status=0/SUCCESS)

Oct 20 01:45:57 localhost.localdomain systemd[1]: Starting The nginx HTTP and reverse proxy server...
Oct 20 01:45:57 localhost.localdomain nginx[10719]: nginx: [emerg] no port in upstream "php-fpm" in /etc/nginx/default.d/phpMyAdmin.conf:17
Oct 20 01:45:57 localhost.localdomain nginx[10719]: nginx: configuration file /etc/nginx/nginx.conf test failed
Oct 20 01:45:57 localhost.localdomain systemd[1]: nginx.service: Control process exited, code=exited status=1
Oct 20 01:45:57 localhost.localdomain systemd[1]: Failed to start The nginx HTTP and reverse proxy server.
Oct 20 01:45:57 localhost.localdomain systemd[1]: nginx.service: Unit entered failed state.
Oct 20 01:45:57 localhost.localdomain systemd[1]: nginx.service: Failed with result 'exit-code'.

我尝试了几种通过更改 listen 80 来修复的方法。至 listen 801在/etc/nginx/nginx.conf 但没有问题。我也遵循了以下网址,但无法解决此问题。

nginx not started and can't start

https://serverfault.com/questions/717752/cant-start-nginx-code-exited-status-1-failure

/etc/nginx/default.d/phpMyAdmin.conf
# phpMyAdmin

location = /phpMyAdmin {
alias /usr/share/phpMyAdmin/;
}

location /phpMyAdmin/ {
root /usr/share;
index index.php index.html;

location ~ ^/phpMyAdmin/(.+\.php)$
{
try_files $uri =404;
fastcgi_intercept_errors on;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass php-fpm; //this is line number 17
}
}

提前致谢。

最佳答案

按照@mattdm 的建议回答我的问题,我安装了 php-fpm,现在它开始工作了。

sudo dnf install php-fpm

关于nginx - 启动失败 nginx HTTP 和反向代理服务器问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40141081/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com