Ado::Command::generate::apache2htaccess - Generates Apache2 .htaccess file
Usage: #on the command-line $ bin/ado generate apache2htaccess --modules cgi,fcgid > .htaccess #programatically use Ado::Command::generate::apache2htaccess; my $v = Ado::Command::generate::apache2htaccess->new; $v->run('--modules' => 'cgi,fcgid');
Ado::Command::generate::apache2htaccess generates an Apache2 .htaccess configuration file for your Ado application. You can use this command for a shared hosting account.
.htaccess
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.
Below are the options this command accepts, described in Getopt::Long notation.
Full path to the file in which the configuration will be written. If not provided the configuration is printed to the screen.
Verbose output.
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 will use Plack (plackup) or Mojo::Server::FastCGI. So make sure you have at least one of them installed. Plack is recommended. To use Plack with mod_fcgid you will need to install FCGI, FCGI::ProcManager and Apache::LogFormat::Compiler.
ado
mod_cgi
mod_fcgid
plackup
Ado::Command::generate::apache2htaccess inherits all attributes from Ado::Command::generate and implements the following new ones.
my $description = $htaccess->description; $v = $htaccess->description('Foo!');
Short description of this command, used for the command list.
my $usage = $htaccess->usage; $v = $htaccess->usage('Foo!');
Usage information for this command, used for the help screen.
Ado::Command::generate::apache2htaccess inherits all methods from Ado::Command::generate and implements the following new ones.
my $htaccess = Ado::Command::generate::apache2htaccess->run(@ARGV); my $htaccess = $app->commands->run("generate", "apache2htaccess", '-m' => 'cgi,fcgid', '-c' => $config_file); Run this command. Returns C<$self>.
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, Mojo::Server::FastCGI.
To install Ado, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Ado
CPAN shell
perl -MCPAN -e shell install Ado
For more information on module installation, please visit the detailed CPAN module installation guide.