Nginx
| Command | Description | |
|---|---|---|
sudo nginx -t | Test config syntax | |
sudo systemctl reload nginx | Reload without dropping connections | |
sudo tail -f /var/log/nginx/error.log | Error log stream | |
curl -I http://localhost | Check HTTP response headers |
systemctl
| Command | Description | |
|---|---|---|
sudo systemctl status nginx | Service state and recent logs | |
sudo systemctl start|stop|restart nginx | Control service | |
sudo systemctl enable nginx | Start on boot | |
sudo systemctl list-units --type=service --state=failed | Failed services |
journalctl
| Command | Description | |
|---|---|---|
sudo journalctl -u nginx -f | Follow service logs | |
sudo journalctl -u nginx --since "1 hour ago" | Logs since time | |
sudo journalctl -p err -b | Errors since last boot | |
sudo journalctl -xe | Recent entries with hints |