[已解决]NGINX稳定版无法启动

Ryan 2018-6-21 2155

执行结果:
操作失败:ServiceControlFailed!
[backcolor=rgb(16, 16, 16)]Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.[/backcolor]

最新回复 (8)
  • 小鱼儿 2018-6-21
    引用 2
    请在网站管理中执行下配置检测.检查下配置文件是否正常.
  • Ryan 2018-6-21
    引用 3
    nginx: [emerg] dlopen() "/etc/nginx/modules/ngx_http_sysguard_module.so" failed (/etc/nginx/modules/ngx_http_sysguard_module.so: cannot open shared object file: No such file or directory) in /etc/nginx/nginx.conf:1
    nginx: configuration file /etc/nginx/nginx.conf test failed
  • 小鱼儿 2018-6-21
    引用 4
    你的nginx 安装过sysguard 扩展(监控系统的负载和资源占用从而对系统进行保护。),
    后来卸载了, 可是配置中没有禁用导致的.

    解决方法有两种.
    1 重新安装sysguard 扩展
    2 在网站管理->组件管理->nginx->全局源文->编辑,删除以下行
    load_module       modules/ngx_http_sysguard_module.so;
    
    保存后即可重启
  • Ryan 2018-6-21
    引用 5
    安装Nginx失败:未知错误
    软件冲突: 暂无解决方案
    Transaction Summary=======================================================================================Install 20 Packages (+2 Dependent packages)Total size: 15 MTotal download size: 18 kInstalled size: 45 MDownloading packages:Delta RPMs disabled because /usr/bin/applydeltarpm not installed.appnode-nginx-stable-module-he FAILED http://repo.appnode.com/stable/el/7/x86_64/appnode-nginx-stable-module-headers-more-1.14.0.0.32-1.el7.x86_64.rpm: [Errno 14] HTTP Error 416 - Requested Range Not SatisfiableTrying other mirror.Error downloading packages: 1:appnode-nginx-stable-module-headers-more-1.14.0.0.32-1.el7.x86_64: [Errno 256] No more mirrors to try.
  • Ryan 2018-6-21
    引用 6
    nginx: [emerg] unknown directive "brotli" in /home/WHMCS/sites/www.net.com/conf/nginx.conf:26
    nginx: configuration file /etc/nginx/nginx.conf test failed
  • Ryan 2018-6-21
    引用 7
    Quote小鱼儿 发表于 2018-6-21 11:44
    请在网站管理中执行下配置检测.检查下配置文件是否正常.

    user              nginx;
    worker_processes  1;
    error_log         /var/log/nginx/error.log warn;
    pid               /var/run/nginx.pid;
    
    events {
        worker_connections  1024;
    }
    
    http {
        include                        /etc/nginx/mime.types;
        default_type                   application/octet-stream;
        log_format                     main '$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" "$http_x_forwarded_for"';
        access_log                     /var/log/nginx/access.log main;
        sendfile                       on;
        keepalive_timeout              65;
        include                        conf.sitemgr.d/main.conf;
        include                        conf.sitemgr.d/global/conf/http.conf;
        server_names_hash_max_size     512;
        server_names_hash_bucket_size  128;
    }
    
    stream {
        log_format  proxy '$remote_addr [$time_local] $protocol $status $bytes_sent $bytes_received $session_time "$upstream_addr" "$upstream_bytes_sent" "$upstream_bytes_received" "$upstream_connect_time"';
        include     conf.sitemgr.d/main_stream.conf;
    }



    看起来没有这个配置啊
  • 小鱼儿 2018-6-21
    引用 8
    QuoteRyan 发表于 2018-6-21 14:26
    nginx: [emerg] unknown directive "brotli" in /home/WHMCS/sites/www.net.com/conf/nginx.conf:26
    nginx: ...

    这个错误是在站点配置
    这个文件下 /home/WHMCS/sites/www.net.com/conf/nginx.conf

    而不是全局配置.
    这应该也是插件问题导致的. 你的站点开启了brotli了吧. 可是扩展又没有启动导致的.
    你需要去站点里面把brotli给关闭 .然后部署重载.
  • 小鱼儿 2018-6-21
    引用 9
    我前面只让你删除
    load_module modules/ngx_http_sysguard_module.so;
    你把 brotli插件也删除了吧, 才会导致这个问题.
返回
发新帖