Apache2 Workshop Installation und Handling
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
Apachectl
- apachectl status
- apachectl configtest
- apachectl graceful
- apachectl restart
- apachectl stop
Fehlersuche
- apachectl configtest
- systemctl restart apache2 && journalctl -fu apache2
Module aktivieren/deaktivieren
- a2enmod rewrite
- a2enmod ssl
- a2enmod headers
- a2enmod proxy
- a2enmod proxy_http
- a2enmod proxy_wstunnel
- a2dismod autoindex
- a2dismod status
- systemctl reload apache2
Seiten aktivieren/deaktivieren
- a2ensite default-ssl
- a2ensite mysite.conf
- a2dissite 000-default.conf
- systemctl reload apache2
Verfügbare Seiten und Module
- ls /etc/apache2/sites-available
- ls /etc/apache2/mods-available
Aktive Seiten und Module
- ls /etc/apache2/sites-enabled
- ls /etc/apache2/mods-enabled