Jump to content

System:Service Management: Difference between revisions

From jb-vpn.uk Wiki
Minor update - troubleshooting guide: Service Management (13 sections)
Content added - troubleshooting guide: Service Management (19 sections)
Line 1: Line 1:
= Service Management =
This document describes how to manage services in the reverse proxy system.
This document describes how to manage services in the reverse proxy system.


Line 60: Line 58:
=== Regular Tasks ===
=== Regular Tasks ===


= '''Certificate Monitoring''': Verify auto-renewal is working (certbot handles this) =
==== '''Certificate Monitoring''': Verify auto-renewal is working (certbot handles this) ====
= '''Log Review''': Check nginx logs for errors or unusual activity =
== '''Log Review''': Check nginx logs for errors or unusual activity ==
= '''Package Updates''': Keep nginx and certbot updated =
== '''Package Updates''': Keep nginx and certbot updated ==
= '''Configuration Backups''': Backup nginx configurations periodically =
== '''Configuration Backups''': Backup nginx configurations periodically ==


=== Backup Commands ===
=== Backup Commands ===


<pre class="lang-bash">
<pre class="lang-bash">
= Backup nginx configurations =
==== Backup nginx configurations ====
tar -czf nginx-config-backup-$(date +%Y%m%d).tar.gz /etc/nginx/sites-available/
tar -czf nginx-config-backup-$(date +%Y%m%d).tar.gz /etc/nginx/sites-available/


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

Revision as of 13:44, 1 January 2026

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