Secure & Optimize Moodle System

  1. Configure .htaccess to protect the moodledata directory
  • Run the command sudo nano /var/www/moodledata/.htaccess
  • Add the content deny from all, then save.
  1. Enable the firewall (UFW).
  • Run the following commands in order:
  • sudo ufw allow OpenSSH
  • sudo ufw allow ‘Apache Full’
  • sudo ufw enable
  • sudo ufw status

S3