Virtual Host File

Moodle Virtual Host File

  1. Create a virtual host configuration file for Moodle, like the example below (replacing subdomain.domain.com with an appropriate name).  For more information on how to do this, see Apache Virtual Hosts
<VirtualHost subdomain.domain.com:80>
        ServerName subdomain.domain.com

        Redirect permanent / https://subdomain.domain.com

</VirtualHost>

<VirtualHost subdomain.domain.com:443>
        ServerName subdomain.domain.com

        DocumentRoot "/var/www/subdomain.domain.com"
        <Directory "/var/www/subdomain.domain.com">

        Options Indexes FollowSymLinks MultiViews
        # AllowOverride controls what directives may be placed in .htaccess files.
        AllowOverride All

        # Controls who can get stuff from this server file
        Order allow,deny
        Allow from all

        </Directory>

        <IfModule mpm_peruser_module>
                ServerEnvironment apache apache
        </IfModule>

</VirtualHost>

Revision #1
Created 23 April 2020 08:15:56 by Admin
Updated 23 April 2020 08:24:51 by Admin