-
Notifications
You must be signed in to change notification settings - Fork 6
/
apache-all-moodles.conf
48 lines (40 loc) · 1.24 KB
/
apache-all-moodles.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# This requires using apache mod_macro
#
# 1) Copy or symink this file into:
# /etc/apache2/sites-enabled/apache-all-moodles
#
# 2) Install the apache macro module:
#
# sudo apt-get install libapache2-mod-macro
# sudo a2enmod macro
# sudo service apache restart
#
# 3) As needed add more records at the bottom which use the macro
# It will winge about the missing log directory so go make that
#
# 4) Update your /etc/hosts file if not using some dns magic
#
<Macro MoodleHost $host>
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName $host
DocumentRoot /var/www/$host
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/$host/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/$host/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/$host/access.log combined
</VirtualHost>
</Macro>
## Use of VHost with different arguments.
Use MoodleHost latrobe.moodle.local