apache2 ======== check ip address ============== hostname -I check status of port 80 =================== netstat | grep :80 create virtual host for multiple domains ================================ sudo mkdir /var/www/xxx.ca sudo chown -R $USER:$USER /var/www/xxx.ca sudo chmod -R 755 /var/www/xxx.ca sudo nano /etc/apache2/sites-available/xxx.conf sudo a2endsite xxx.conf sudo a2dissite 000-default.conf sudo systemctl reload apache2 sudo systemctl restart apache2 nano /var/www/xxx/index.html enable ssl ========= sudo apt install certbot sudo apt install python3-certbot-apache sudo certbot --apache create robots.txt for search engine =================================== touch /var/www/html/robots.txt nano robots.txt User-agent: * Disallow: view logs ========= cat /var/log/apache2/access.log.1 rotate logs =========== cat /etc/logrotate.d/apache2 error pages ============ nano /etc/apache2/sites-available/000-default-le-ssl.conf add before virtual host tag ErrorDocument 404 "The requested document was not found on this server." sudo service apache2 restart