summaryrefslogtreecommitdiff
blob: 4b845617469b6defa0ae8d7980a995914d068783 (plain)
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
<IfDefine MACRO>
	<IfModule !mod_macro.c>
		LoadModule macro_module modules/mod_macro.so
	</IfModule>
</IfDefine>

<IfModule mod_macro.c>
	# Definition of a MyVirtualHost Macro.

	<Macro MyVirtualHost $host $port $dir>
		Listen $port
		
		<VirtualHost $host:$port>
			DocumentRoot $dir
	
			<Directory $dir>
				# do something here...
			</Directory>
	
			# limit access to intranet subdir.
			<Directory $dir/intranet>
				order deny,allow
				deny from all
				allow from 10.0.0.0/8
			</Directory>
		</VirtualHost>
	</Macro>
	
	# Use of MyVirtualHost with different arguments.
	#Use MyVirtualHost www.apache.org 80 /projects/apache/web
	#Use MyVirtualHost www.perl.com 8080 /projects/perl/web
	#Use MyVirtualHost www.ensmp.fr 1234 /projects/mines/web
</IfModule>