
Provision::Unix::Web::Apache - provision web hosting accounts on Apache

version 1.05


Create an Apache vhost container like this:
<VirtualHost *:80 >
ServerName blockads.com
ServerAlias ads.blockads.com
DocumentRoot /usr/home/blockads.com/ads
ServerAdmin admin@blockads.com
CustomLog "| /usr/local/sbin/cronolog /usr/home/example.com/logs/access.log" combined
ErrorDocument 404 "blockads.com
</VirtualHost>
my $apache->create($vals, $conf);
Required values:
ip - an ip address
name - vhost name (ServerName)
docroot - Apache DocumentRoot
Optional values
serveralias - Apache ServerAlias names (comma seperated)
serveradmin - Server Admin (email address)
cgi - CGI directory
customlog - obvious
customerror - obvious
sslkey - SSL certificate key
sslcert - SSL certificate
Enable a (previously) disabled virtual host.
$apache->enable($vals, $conf);
Disable a previously disabled vhost.
$apache->disable($vals, $conf);
Delete's an Apache vhost.
$apache->destroy();
Tests to see if a vhost definition already exists in your Apache config file(s).
Shows the contents of a virtualhost block that matches the virtual domain name passed in the $vals hashref.
$apache->show($vals, $conf);
If vhosts are each in their own file, this determines the file name the vhost will live in and returns it. The general methods on my systems works like this:
example.com would be stored in $apache/vhosts/example.com.conf
so would any subdomains of example.com.
thus, a return value for *.example.com will be "$apache/vhosts/example.com.conf".
$apache is looked up from the contents of $conf.
Find a vhost declaration block in the Apache config file(s).

Please report any bugs or feature requests to bug-unix-provision-virtualos at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Provision-Unix. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

You can find documentation for this module with the perldoc command.
perldoc Provision::Unix
You can also look for information at:


Matt Simerson <msimerson@cpan.org>

This software is copyright (c) 2011 by The Network People, Inc..
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.