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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3184 - (hide annotations) (download)
Thu May 23 15:07:42 2013 UTC (11 years, 4 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 boklm 207 <VirtualHost *:80>
2     DocumentRoot /var/www/html
3     <Location />
4     Allow from all
5     </Location>
6 boklm 3184 <%-
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 boklm 207 </VirtualHost>

  ViewVC Help
Powered by ViewVC 1.1.30