NAME
Ado::Command::generate::apache2htaccess - Generates Apache2 .htaccess file
SYNOPSIS
Usage:
#on the command-line
$ bin/ado generate apache2htaccess --module cgi,fcgid > $MOJO_HOME/.htaccess
#programatically
use Ado::Command::generate::apache2htaccess;
my $v = Ado::Command::generate::apache2htaccess->new;
$v->run('--module' => 'cgi,fcgid');
DESCRIPTION
Ado::Command::generate::apache2htaccess generates an Apache2 .htaccess
configuration file for your Ado application. You can use this command on a shared hosting account.
This is a core command, that means it is always enabled and its code a good example for learning to build new commands, you're welcome to fork it.
OPTIONS
Below are the options this command accepts described in Getopt::Long notation.
c|config_file=s
Full path to the file in which the configuaration will be written. If not provided the configuaration is printed to the screen.
v|verbose
Verbose output.
m|module=s@
Apache modules to use for running ado
. Currently supported modules are mod_cgi
and mod_fcgid
. You can mention them both to add the corresponding sections and Apache will use mod_fcgid
if loaded or mod_cgi
(almost always enabled). The generated configuration for mod_fcgid is known to work with Mojo::Server::FastCGI. So make sure you have it installed.
ATTRIBUTES
Ado::Command::generate::apache2htaccess inherits all attributes from Ado::Command::generate and implements the following new ones.
args
Used for storing arguments from the commandline and then passing them to the template
my $args = $self->args;
description
my $description = $htaccess->description;
$v = $htaccess->description('Foo!');
Short description of this command, used for the command list.
usage
my $usage = $htaccess->usage;
$v = $htaccess->usage('Foo!');
Usage information for this command, used for the help screen.
METHODS
Ado::Command::generate::apache2htaccess inherits all methods from Ado::Command::generate and implements the following new ones.
run
$htaccess->run(@ARGV);
Run this command.
SEE ALSO
Ado::Plugin::Routes, Apache deployment, Apache - Upgrading to 2.4 from 2.2, Ado::Command::generate::apache2vhost, Ado::Command::generate, Getopt::Long, Ado::Command Ado::Manual, Mojolicious, "DEPLOYMENT" in Mojolicious::Guides::Cookbook.