Creating the LMS environment

icon picker
Set up Virtual host configuration file

Create new Virtual host files for the LMS on our server by entering the below command. (Replace <domain_name> with an actual name for the domain)

sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/steadfastlms.conf
2. Edit the above file by entering the below command.
sudo nano /etc/apache2/sites-available/steadfastlms.conf
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 (
CtrlP
) instead.