/[adm]/puppet/modules/apache/templates/00_default_vhosts.conf
ViewVC logotype

Contents of /puppet/modules/apache/templates/00_default_vhosts.conf

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3184 - (show annotations) (download)
Thu May 23 15:07:42 2013 UTC (10 years, 11 months ago) by boklm
File size: 342 byte(s)
apache: add option to select default redirect URL

Add an option to change the URL to redirect to in case of unknown vhost.
If the option is not provided, a 404 error is returned.
1 <VirtualHost *:80>
2 DocumentRoot /var/www/html
3 <Location />
4 Allow from all
5 </Location>
6 <%-
7 default_redirect = scope.lookupvar('apache::var::default_vhost_redirect')
8 if default_redirect == ''
9 -%>
10 Redirect 404 /
11 ErrorDocument 404 "Page Not Found"
12 <%- else -%>
13 Redirect / <%= default_redirect %>
14 <%- end -%>
15 </VirtualHost>

  ViewVC Help
Powered by ViewVC 1.1.30