NAME
Slovo::Command::Author::generate::a2htaccess - Generate a .htaccess for running Slovo under Apache 2/CGI
SYNOPSIS
Usage: slovo [OPTIONS]
# Default values.
slovo generate a2htaccess
# Custom values
slovo generate a2htaccess -r /home/me/www --cgi_script index.cgi
Options:
-h, --help Show this summary of available options
-r, --docroot Defaults to $app->home/..
-s, --cgi_script Defaults to $app->moniker.cgi
DESCRIPTION
This command expects that you have already run Slovo::Command::Author::generate::a2htaccess.
Slovo::Command::Author::generate::a2htaccess will generate a .htaccess for running Slovo under Apache/CGI. Although Slovo performs best as a daemon run by hypnotoad, it can as well be used on a cheap shared hosting. The .htaccess adds settings for Apache2 to preprocess all requests via mod_rewrite. When the produced CGI script (e.g. slovo.cgi
) is run on a page from the site, it will dump the produced on-the-fly HTML to a static html-file. Later, upon another HTTP request, the produced html-file will be just spit out by Apache without invoking slovo.cgi again. This way Slovo acts as a static site generator. This is completely enough for blogs. Serving static pages is faster than anything else.
ATTRIBUTES
Slovo::Command::Author::generate::a2htaccess inherits all attributes from Slovo::Command and implements the following new ones.
description
my $description = $a2htaccess->description;
$cpanify = $a2htaccess->description('Foo');
Short description of this command, used for the command list.
usage
my $usage = $a2htaccess->usage;
$cpanify = $a2htaccess->usage('Foo');
Usage information for this command, used for the help screen.
METHODS
Slovo::Command::Author::generate::a2htaccess inherits all methods from Slovo::Command and implements the following new ones.
run
$a2htaccess->run(@ARGV);
Run this command.
SEE ALSO
Slovo,Mojolicious::Command "Adding-commands-to-Mojolicious" in Mojolicious::Guides::Cookbook, Mojolicious::Guides, https://слово.бг.