Secure & Optimize Moodle System
- Configure .htaccess to protect the moodledata directory
- Run the command sudo nano /var/www/moodledata/.htaccess
- Add the content deny from all, then save.
- 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
