3. Paste the following details to the above file (This is what is going to reroute traffic to the correct domain. We will replace this file with the actual domain details in future).
<VirtualHost *:80>
ServerAdmin admin@<lms_domain_name>
ServerName <lms_domain_name>
ServerAlias www.<lms_domain_name>
DocumentRoot /var/www/<name of the lms folder>/moodle
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<Directory /var/www/<name of the lms folder>/moodle>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
Once done, click CTRL - X to exit, and hit Y then Enter to save your changes.
4. Finally, enable the LMS site using the command below:
sudo a2ensite <lms_domain_name>.conf
To restart the apache2 server run:
sudo systemctl reload apache2
Want to print your doc? This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (