Nginx customizado compilado com ngx_pagespeed no CentOS 7 não será iniciado

0

Como o PageSpeed deve ser compilado junto com o Nginx, e eu não gosto da maneira como as instruções estão na página do Google, eu decidi seguir outro grande.

De qualquer forma, fiz tudo lá. E quando chego ao service nginx restart , recebo um erro FAILED:

Restarting nginx (via systemctl):  Job for nginx.service failed. See 'systemctl status nginx.service' and 'journalctl -xn' for details.
                                                           [FAILED]

systemctl status nginx.service -l output:

systemctl status nginx.service -l
nginx.service - SYSV: Nginx is an HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3 proxy server
   Loaded: loaded (/etc/rc.d/init.d/nginx)
   Active: failed (Result: exit-code) since mar 2015-03-17 12:59:03 EDT; 1min 21s ago
  Process: 19716 ExecStart=/etc/rc.d/init.d/nginx start (code=exited, status=203/EXEC)

mar 17 12:59:03 alemany.me systemd[1]: Starting SYSV: Nginx is an HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3 proxy server...
mar 17 12:59:03 alemany.me systemd[1]: nginx.service: control process exited, code=exited status=203
mar 17 12:59:03 alemany.me systemd[1]: Failed to start SYSV: Nginx is an HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3 proxy server.
mar 17 12:59:03 alemany.me systemd[1]: Unit nginx.service entered failed state.

journalctl -xn output:

journalctl -xn
-- Logs begin at mar 2015-03-17 11:09:37 EDT, end at mar 2015-03-17 13:05:46 EDT. --
mar 17 13:03:39 alemany.me systemd[1]: Starting SYSV: Nginx is an HTTP(S) server, HTTP(S) reverse proxy
-- Subject: Unit nginx.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit nginx.service has begun starting up.
mar 17 13:03:39 alemany.me systemd[19761]: Failed at step EXEC spawning /etc/rc.d/init.d/nginx: Exec fo
-- Subject: Process /etc/rc.d/init.d/nginx could not be executed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- The process /etc/rc.d/init.d/nginx could not be executed and failed.
-- 
-- The error number returned while executing this process is 8.
mar 17 13:03:39 alemany.me systemd[1]: nginx.service: control process exited, code=exited status=203
mar 17 13:03:39 alemany.me systemd[1]: Failed to start SYSV: Nginx is an HTTP(S) server, HTTP(S) revers
-- Subject: Unit nginx.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit nginx.service has failed.
-- 
-- The result is failed.
mar 17 13:03:39 alemany.me systemd[1]: Unit nginx.service entered failed state.
lines 1-25...skipping...
-- Logs begin at mar 2015-03-17 11:09:37 EDT, end at mar 2015-03-17 13:05:46 EDT. --                                                                                                           
mar 17 13:03:39 alemany.me systemd[1]: Starting SYSV: Nginx is an HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3 proxy server...                                                          
-- Subject: Unit nginx.service has begun with start-up                                                                                                                                         
-- Defined-By: systemd                                                                                                                                                                         
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel                                                                                                                        
--                                                                                                                                                                                             
-- Unit nginx.service has begun starting up.                                                                                                                                                   
mar 17 13:03:39 alemany.me systemd[19761]: Failed at step EXEC spawning /etc/rc.d/init.d/nginx: Exec format error                                                                              
-- Subject: Process /etc/rc.d/init.d/nginx could not be executed                                                                                                                               
-- Defined-By: systemd                                                                                                                                                                         
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel                                                                                                                        
--                                                                                                                                                                                             
-- The process /etc/rc.d/init.d/nginx could not be executed and failed.                                                                                                                        
--                                                                                                                                                                                             
-- The error number returned while executing this process is 8.                                                                                                                                
mar 17 13:03:39 alemany.me systemd[1]: nginx.service: control process exited, code=exited status=203                                                                                           
mar 17 13:03:39 alemany.me systemd[1]: Failed to start SYSV: Nginx is an HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3 proxy server.                                                     
-- Subject: Unit nginx.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit nginx.service has failed.
-- 
-- The result is failed.
mar 17 13:03:39 alemany.me systemd[1]: Unit nginx.service entered failed state.
mar 17 13:05:46 alemany.me systemd[1]: Starting SYSV: Nginx is an HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3 proxy server...
-- Subject: Unit nginx.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit nginx.service has begun starting up.
mar 17 13:05:46 alemany.me systemd[19766]: Failed at step EXEC spawning /etc/rc.d/init.d/nginx: Exec format error
-- Subject: Process /etc/rc.d/init.d/nginx could not be executed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- The process /etc/rc.d/init.d/nginx could not be executed and failed.
-- 
-- The error number returned while executing this process is 8.
mar 17 13:05:46 alemany.me systemd[1]: nginx.service: control process exited, code=exited status=203
mar 17 13:05:46 alemany.me systemd[1]: Failed to start SYSV: Nginx is an HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3 proxy server.
-- Subject: Unit nginx.service has failed

Eu pensei que talvez algo estivesse escutando a porta 80. Aqui está a saída "netstat":

netstat -punta
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      899/master          
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      747/sshd            
tcp        0     36 128.199.42.29:22        200.55.154.30:38580     ESTABLISHED 9536/sshd: root@pts 
tcp6       0      0 ::1:25                  :::*                    LISTEN      899/master          
tcp6       0      0 :::22                   :::*                    LISTEN      747/sshd            
udp        0      0 0.0.0.0:33440           0.0.0.0:*                           344/avahi-daemon: r 
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           344/avahi-daemon: r

De qualquer forma, não tenho ideia do porquê disso acontecer. Eu instalei isso em um VPS CentOS 7 que está em estado zero. Nada mais está instalado lá.

Obrigado antecipadamente.

    
por Alain 17.03.2015 / 18:38

1 resposta

1

Verifique se o script de inicialização é executável:

chmod +x /etc/init.d/nginx

Verifique também o status do selinux. Você pode desativá-lo temporariamente emitindo o seguinte comando:

setenforce 0
    
por 19.11.2015 / 09:46