Jump to content

System:Service Management

From jb-vpn.uk Wiki
Revision as of 13:15, 1 January 2026 by Josh (talk | contribs) (Added troubleshooting guide: Service Management)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Service Management

This document describes how to manage services in the reverse proxy system.

Nginx Service

Status Check

systemctl status nginx

Configuration Test

nginx -t

Reload Configuration

Reload nginx to apply new configuration (graceful, no downtime):

systemctl reload nginx

Restart Service

systemctl restart nginx

Logs

Access Logs

Location: /var/log/nginx/access.log

Records all HTTP requests Useful for traffic analysis and debugging

Error Logs

Location: /var/log/nginx/error.log

Records errors and warnings First place to check for issues

View Logs

tail -f /var/log/nginx/access.log
tail -f /var/log/nginx/error.log

Maintenance

Regular Tasks

Certificate Monitoring: Verify auto-renewal is working (certbot handles this)

Log Review: Check nginx logs for errors or unusual activity

Package Updates: Keep nginx and certbot updated

Configuration Backups: Backup nginx configurations periodically

Backup Commands

= Backup nginx configurations =
tar -czf nginx-config-backup-$(date +%Y%m%d).tar.gz /etc/nginx/sites-available/

= Backup SSL certificates (optional, usually not needed) =
tar -czf certbot-backup-$(date +%Y%m%d).tar.gz /etc/letsencrypt/

[Network Architecture](network-architecture.md) - Network overview Troubleshooting - Service troubleshooting