Apache2 Workshop Installation und Handling

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen

Installation

  • sudo apt install -y apache2

Handling

  • systemctl status apache2
  • systemctl stop apache2
  • systemctl start apache2
  • systemctl restart apache2
  • systemctl reload apache2
  • systemctl is-enabled apache2

Welche Ports sind offen?

  • ss -lntp | grep apache2

Logging

systemd
  • journalctl -fu apache2
  • journalctl -n 20 -u apache2
eigene Logs
  • tail -f /var/log/apache2/access.log
  • tail -f /var/log/apache2/error.log

Installation

  • sudo apt install -y apache2

Handling

  • systemctl status apache2
  • systemctl stop apache2
  • systemctl start apache2
  • systemctl restart apache2
  • systemctl reload apache2
  • systemctl is-enabled apache2

Welche Ports sind offen?

  • ss -lntp | grep apache2

Logging

systemd
  • journalctl -fu apache2
  • journalctl -n 20 -u apache2
eigene Logs
  • tail -f /var/log/apache2/access.log
  • tail -f /var/log/apache2/error.log

Apachectl

  • apachectl status # Status anzeigen
  • apachectl configtest # Konfigurationssyntax prüfen
  • apachectl graceful # Sanften Neustart durchführen
  • apachectl restart # Neustart erzwingen
  • apachectl stop # Stoppen

Fehlersuche

  • apachectl configtest # Syntax prüfen
  • systemctl restart apache2 && journalctl -fu apache2 # Neustart und Live-Log