b16b3040d9b2a322efb4e434a1b7b5b114f2d8b8
[freeside.git] / FS / FS / part_export / apache.pm
1 package FS::part_export::apache;
2
3 use vars qw(@ISA %info);
4 use Tie::IxHash;
5 use FS::part_export::null;
6
7 @ISA = qw(FS::part_export::null);
8
9 tie my %options, 'Tie::IxHash',
10   'user'       => { label=>'Remote username', default=>'root' },
11   'httpd_conf' => { label=>'httpd.conf snippet location',
12                     default=>'/etc/apache/httpd-freeside.conf', },
13   'template'   => {
14     label   => 'Template',
15     type    => 'textarea',
16     default => <<'END',
17 <VirtualHost $domain> #generic
18 #<VirtualHost ip.addr> #preferred, http://httpd.apache.org/docs/dns-caveats.html
19 DocumentRoot /var/www/$zone
20 ServerName $zone
21 ServerAlias *.$zone
22 #BandWidthModule On
23 #LargeFileLimit 4096 12288
24 </VirtualHost>
25
26 END
27   },
28 ;
29
30 %info = (
31   'svc'     => 'svc_www',
32   'desc'    => 'Export an Apache httpd.conf file snippet.',
33   'options' => \%options,
34   'notes'   => <<'END'
35 Batch export of an httpd.conf snippet from a template.  Typically used with
36 something like <code>Include /etc/apache/httpd-freeside.conf</code> in
37 httpd.conf.  <a href="http://search.cpan.org/dist/File-Rsync">File::Rsync</a>
38 must be installed.  Run bin/apache.export to export the files.
39 END
40 );
41
42 1;
43