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


Provision-Unix documentation  | view source Contained in the Provision-Unix distribution.

Index


NAME

Top

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

SYNOPSIS

Top

FUNCTIONS

Top

create

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

Enable a (previously) disabled virtual host.

    $apache->enable($vals, $conf);

disable

Disable a previously disabled vhost.

    $apache->disable($vals, $conf);

destroy

Delete's an Apache vhost.

    $apache->destroy();




exists

Tests to see if a vhost definition already exists in your Apache config file(s).

show

Shows the contents of a virtualhost block that matches the virtual domain name passed in the $vals hashref.

	$apache->show($vals, $conf);

get_file

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.

get_match

Find a vhost declaration block in the Apache config file(s).

AUTHOR

Top

Matt Simerson, <matt at tnpi.net>

BUGS

Top

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.

SUPPORT

Top

You can find documentation for this module with the perldoc command.

    perldoc Provision::Unix




You can also look for information at:

* RT: CPAN's request tracker

http://rt.cpan.org/NoAuth/Bugs.html?Dist=Provision-Unix

* AnnoCPAN: Annotated CPAN documentation

http://annocpan.org/dist/Provision-Unix

* CPAN Ratings

http://cpanratings.perl.org/d/Provision-Unix

* Search CPAN

http://search.cpan.org/dist/Provision-Unix

ACKNOWLEDGEMENTS

Top

COPYRIGHT & LICENSE

Top


Provision-Unix documentation  | view source Contained in the Provision-Unix distribution.