WebDAO
view release on metacpan or search on metacpan
contrib/Setup.ru.pod view on Meta::CPAN
ÐÐ¾Ð·Ð¼Ð¾Ð¶Ð½Ñ Ð´Ð²Ð° Ñежима. Ðогда иÑполÑзÑеÑÑÑ ÑобÑÑвеннÑй Ð¼ÐµÐ½ÐµÐ´Ð¶ÐµÑ I<FCGI>( I<FastCgiServer> ) и
кода подклÑÑение пÑоизводиÑÑÑ ÑеÑез FCGI ÑокеÑ.
ТÑебÑеÑÑÑ ÑÑÑановка модÑÐ»Ñ I<mod_fastcgi>:
mod_fastcgi-2.4.2
РглобалÑной ÑаÑÑи C<httpd.conf> ÑÑебÑеÑÑÑ Ð´Ð¾Ð±Ð°Ð²Ð¸ÑÑ Ð¾Ð´Ð½Ñ Ð¸Ð· необÑ
одимÑÑ
ÑекÑий:
=item 1 Static (FastCgiServer)
<LoadModule fastcgi_module /usr/lib/apache2/modules/mod_fastcgi.so
<IfModule mod_fastcgi.c>
AddHandler fastcgi-script fpl fcgi
FastCgiServer /usr/local/bin/wd_fcgi.fpl \
-idle-timeout 3000 -flush -restart-delay 5 \
-initial-env wdFCGIreq=1000 -processes 4 \
</IfModule>
=item 2 Standalone ( FastCgiExternalServer )
<LoadModule fastcgi_module /usr/lib/apache2/modules/mod_fastcgi.so
<IfModule mod_fastcgi.c>
# Connect via net socket
# FastCgiExternalServer /usr/local/bin/wd_fcgi.fpl -host localhost:60000
FastCgiExternalServer /usr/local/bin/wd_fcgi.fpl -socket /tmp/myapp.socket
</IfModule>
ÐаÑÑÑойки ÑекÑии B<VirtualHost>:
<VirtualHost>
DocumentRoot /usr/zag/www
ServerName example.org
ErrorLog /var/log/example.org-error_log
CustomLog /var/log/example.org-access_log common
SetEnv wdEngine WedDAO::Kern
SetEnv wdIndexFile index.xhtml
SetEnv wdSession WebDAO::Sessionco
RewriteEngine on
AddDefaultCharset UTF-8
RewriteCond %{HTTP:Authorization} ^(.*)$ [NC]
RewriteRule /.* - [E=HTTP_AUTHORIZATION:%1]
<IfModule mod_fastcgi.c>
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule ^/(.*) /usr/local/bin/wd_fcgi.fpl?$1 [QSA]
</IfModule>
</VirtualHost>
=head4 lighttpd (standalone FastCGI)
var.engine = "ZagSite"
var.defaults = (
"WD_SESSION"=>"WebDAO::Sessionco",
"WD_INDEXFILE"=>"index.xhtm"
)
$HTTP["host"] == "example.org" {
server.document-root = "/home/zag/www/"
setenv.add-environment = var.defaults
}
#use custom root class - MySite
$HTTP["host"] == "example.com" {
server.document-root = "/home/zag/www/"
setenv.add-environment = var.defaults + (
"WD_ENGINE" => "MySite",
"WD_ENGINE_PAR"=>"config=/home/zag/www/mysite.ini"
)
}
#skip static
$HTTP["url"] !~ "^/(js|imag|img|css|static)" {
fastcgi.server = (
"" => (
"" => (
"socket" => "/tmp/webdao.sock",
"check-local" => "disable"
)
)
)
}
=head3 ÐаÑÑÑойка cgi ÑеÑвеÑа
ÐÐ»Ñ ÑабоÑÑ I<WebDAO> как I<CGI> пÑÐ¸Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ Ð¸ÑполÑзÑеÑÑÑ ÑкÑÐ¸Ð¿Ñ I<wd_cgi.pl>.
=head4 apache ( CGI )
<VirtualHost *>
DocumentRoot /usr/zag/www
ServerName example.org
ErrorLog /var/log/example.org-error_log
CustomLog /var/log/example.org-access_log common
SetEnv wdIndexFile index.xhtm
SetEnv wdEngine WebDAO::Engine
SetEnv wdSession WebDAO::Sessionco
RewriteEngine on
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule ^/(.*) /usr/local/bin/wd_cgi.pl?$1 [QSA]
<Directory "/usr/local/bin/wd_cgi.pl">
AddHandler cgi-script cgi pl
Options Indexes FollowSymLinks ExecCGI
</Directory>
</VirtualHost>
=head4 ÐапÑÑк из I<shell>
ÐÐ»Ñ Ð·Ð°Ð¿ÑÑка из командной ÑÑÑоки иÑполÑзÑеÑÑÑ ÑкÑÐ¸Ð¿Ñ I<wd_shell.pl>. РпÑоÑеÑÑе вÑÐ¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ð¸ÑполÑзÑÑÑÑÑ Ð¿ÐµÑеменнÑе окÑÑжениÑ.
Usage:
wd_shell.pl [options] file.pl
options:
-help - print help message
-man - print man page
-f file - set root [x]html file
Options:
-help Print a brief help message and exits
( run in 0.954 second using v1.01-cache-2.11-cpan-39bf76dae61 )