1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Nginx failed to build

Discussion in 'Server Configuration and Hosting' started by Fred., Apr 12, 2015.

  1. Fred.

    Fred. Well-Known Member

    Hi,

    I just ran into a problem while i was rebuilding Nginx.
    I tried a new configuration file, then I got this. So I put my old configuration file back but I still get this.

    Spdy is in there.
    Can anyone help me with this?
    It's a server with directadmin. It's completely down now. :eek: :cry: :coffee:

    Code:
    Enabling nginx in systemd...
    Using 109.**.161.92 for your server IP
    Using 109.**.161.92 for your server IP
    Checking to ensure /etc/nginx/ssl.crt/server.ca is set.
    Using 109.**.161.92 for your server IP
    Using 109.**.161.92 for your server IP
    Restarting nginx.
    Job for nginx.service failed. See 'systemctl status nginx.service' and 'journalctl -xn' for details.
    [root@server01 custombuild]# systemctl status nginx.service
    nginx.service - The nginx HTTP and reverse proxy server
       Loaded: loaded (/etc/systemd/system/nginx.service; enabled)
       Active: failed (Result: exit-code) since zo 2015-04-12 23:53:17 CEST; 25s ago
      Process: 70454 ExecStartPre=/usr/sbin/nginx -t -c /etc/nginx/nginx.conf (code=exited, status=1/FAILURE)
    Main PID: 11823 (code=exited, status=0/SUCCESS)
    
    apr 12 23:53:17 server01.example.com systemd[1]: Starting The nginx HTTP and reverse proxy server...
    apr 12 23:53:17 server01.example.com nginx[70454]: nginx: [emerg] the "spdy" parameter requires ngx_http_spdy_module in /etc/nginx/nginx-vhosts.conf:27
    apr 12 23:53:17 server01.example.com nginx[70454]: nginx: configuration file /etc/nginx/nginx.conf test failed
    apr 12 23:53:17 server01.example.com systemd[1]: nginx.service: control process exited, code=exited status=1
    apr 12 23:53:17 server01.example.com systemd[1]: Failed to start The nginx HTTP and reverse proxy server.
    apr 12 23:53:17 server01.example.com systemd[1]: Unit nginx.service entered failed state.
     
  2. Liam W

    Liam W Well-Known Member

    Looks to me like the spdy module wasn't included in compile time... Are you sure you had it included?

    Liam
     
  3. Fred.

    Fred. Well-Known Member

    It's in configure.nginx
    Then it should be ok right?

    Code:
    #!/bin/sh
    ./configure \
        "--user=nginx" \
        "--group=nginx" \
        "--prefix=/usr" \
        "--sbin-path=/usr/sbin" \
        "--conf-path=/etc/nginx/nginx.conf" \
        "--pid-path=/var/run/nginx.pid" \
        "--http-log-path=/var/log/nginx/access_log" \
        "--error-log-path=/var/log/nginx/error_log" \
        "--with-ipv6" \
        "--without-mail_imap_module" \
        "--without-mail_smtp_module" \
        "--with-http_ssl_module" \
        "--with-http_realip_module" \
        "--with-http_stub_status_module" \
        "--with-http_gzip_static_module" \
        "--with-http_dav_module" \
        "--with-cc-opt='-D FD_SETSIZE=32768'" \
        "--with-http_spdy_module"
    Or what can I do to check that?
     
  4. Tracy Perry

    Tracy Perry Well-Known Member

    nginx -V should give you something like this
    So check and make sure it is compiled in.

    What OS are you compiling on?
     
  5. Luke F

    Luke F Well-Known Member

    Just to be on the safe side given your symptoms, also try /usr/sbin/nginx -V
     
  6. Fred.

    Fred. Well-Known Member

    Someone fixed it for me in less than 1 minute. I don't know what it was. It was 2AM. Going to sleep now. :sleep:
     
  7. Tracy Perry

    Tracy Perry Well-Known Member

    Someone fixed it for you? You allow folks you don't know to have access to shell? ;):p
     
    bortrenamo and Liam W like this.

Share This Page