Desliguei e liguei meu servidor linode que configurei via Serverpilot porque ele estava online e offline. No entanto, desde a reinicialização, não consigo acessar meu site.
Posso acessar arquivos via FTP e SSH. Mas, o site está fora do ar.
ele está usando letsencpt SSL.
Para solucionar o problema, executei alguns comandos:
**I tried to restart nginx and got this**
root@localhost:~# sudo service nginx-sp restart
Job for nginx-sp.service failed because the control process exited with error code. See "systemctl status nginx-sp.service" and "journalctl -xe" for details.
root@localhost:~# systemctl status nginx-sp.service
? nginx-sp.service - nginx-sp
Loaded: loaded (/lib/systemd/system/nginx-sp.service; enabled; vendor preset: enabled)
Active: failed (Result: start-limit-hit) since Tue 2021-01-05 08:33:24 UTC; 49s ago
Process: 1928 ExecStartPre=/opt/sp/nginx/sbin/nginx -t (code=exited, status=1/FAILURE)
Jan 05 08:33:23 localhost systemd[1]: nginx-sp.service: Control process exited, code=exited status=1
Jan 05 08:33:23 localhost systemd[1]: Failed to start nginx-sp.
Jan 05 08:33:23 localhost systemd[1]: nginx-sp.service: Unit entered failed state.
Jan 05 08:33:23 localhost systemd[1]: nginx-sp.service: Failed with result 'exit-code'.
Jan 05 08:33:24 localhost systemd[1]: nginx-sp.service: Service hold-off time over, scheduling restart.
Jan 05 08:33:24 localhost systemd[1]: Stopped nginx-sp.
Jan 05 08:33:24 localhost systemd[1]: nginx-sp.service: Start request repeated too quickly.
Jan 05 08:33:24 localhost systemd[1]: Failed to start nginx-sp.
Jan 05 08:33:24 localhost systemd[1]: nginx-sp.service: Unit entered failed state.
Jan 05 08:33:24 localhost systemd[1]: nginx-sp.service: Failed with result 'start-limit-hit'.
O comando sudo nginx-sp -t retorna o seguinte erro
root@localhost:~# sudo nginx-sp -t
nginx: [warn] the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx-sp/v hosts.d/phoencurrent-ssl.conf:6
nginx: [warn] the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx-sp/v hosts.d/techswatch-ssl.conf:6
nginx: [warn] the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx-sp/v hosts.d/thetechminute-ssl.conf:6
nginx: the configuration file /etc/nginx-sp/nginx.conf syntax is ok
nginx: [emerg] open() "/srv/users/serverpilot/log/phoencurrent/dev_nginx.access.log" failed (2: No such file o r directory)
nginx: configuration file /etc/nginx-sp/nginx.conf test failed
Qualquer ajuda nesse sentido é muito apreciada.
Responder1
Consegui resolver o problema criando dois novos diretórios cuja mensagem de erro mostrava como Inexistente.
nginx: [emerg] open() "/srv/users/serverpilot/log/phoencurrent/dev_nginx.access.log" falhou (2: Arquivo ou diretório inexistente) nginx: arquivo de configuração /etc/nginx-sp/nginx.conf teste falhou
Então tudo que tive que criar foi um novo diretório chamado phoencurrent em /srv/users/serverpilot/log. Reiniciei o Nginx e o problema foi resolvido agora.