
а флаг это как?
Модератор: terminus
Код: Выделить всё
ls -la /путь/до/cgi-bin
Код: Выделить всё
free# ls -la /usr/local/www/netams/cgi-bin
total 116
drwxr-xr-x 4 root wheel 512 Oct 9 18:39 .
drwx--x--x 4 root wheel 512 Oct 9 18:36 ..
-rw-r--r-- 1 root wheel 203 Oct 9 18:39 .htaccess
-rwxr-xr-x 1 root wheel 4171 Oct 8 11:41 activate.cgi
-r--r--r-- 1 root wheel 1499 Oct 8 11:41 activate.tmpl
drwxr-xr-x 2 root wheel 1024 Oct 8 11:41 admin
-rwxr-xr-x 1 root wheel 413 Oct 8 12:59 admintool.cgi
-rwxr-xr-x 1 root wheel 505 Oct 8 11:41 config.cgi
drwxr-xr-x 2 root wheel 512 Oct 8 11:41 images
-rwxr-xr-x 1 root wheel 3778 Oct 8 11:41 login.cgi
-rwxr-xr-x 1 root wheel 3475 Oct 8 11:41 netams_api.pl
-rwxr-xr-x 1 root wheel 1140 Oct 8 11:41 netams_example.cgi
-rwxr-xr-x 1 root wheel 11079 Oct 8 11:41 netams_graph.cgi
-rwxr-xr-x 1 root wheel 21766 Oct 8 11:41 netams_html.cgi
-r--r--r-- 1 root wheel 3123 Oct 8 11:41 russian.res
-rwxr-xr-x 1 root wheel 35209 Oct 8 11:41 statistic.pl
-rwxr-xr-x 1 root wheel 9948 Oct 8 11:41 usertool.cgi
гм... это опять не нескафе ))) cgi-bin, который в папке апача. Этот cgi-bin не трогай пока. Но сразу могу сказать - надо пладельца ставить www:www на /usr/local/www/netams, для cgi это критично. Но лучше попробуй запустить тестовые скрипты из папки cgi-bin, которая в апаче.vasilastr писал(а):ls -la /usr/local/www/netams/cgi-bin
Код: Выделить всё
<Directory "/usr/local/www/netams/cgi-bin">
<Directory "/usr/local/www/apache22/cgi-bin ">
Код: Выделить всё
# NeTAMS section
<Directory "/usr/local/www/netams">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all
DefaultLanguage ru
AddDefaultCharset WINDOWS-1251
</Directory>
Alias /netams/ /usr/local/www/netams/
<Directory ""/usr/local/www/apache22/cgi-bin ">
Options Indexes FollowSymLinks MultiViews ExecCGI
AllowOverride all
Order allow,deny
allow from all
DefaultLanguage ru
AddDefaultCharset WINDOWS-1251
</Directory>
AddHandler cgi-script .cgi
# end NeTAMS section
конфиг не рабочийvasilastr писал(а):<Directory ""/usr/local/www/apache22/cgi-bin ">
Код: Выделить всё
# NeTAMS section
<Directory "/usr/local/www/netams">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all
DefaultLanguage ru
AddDefaultCharset WINDOWS-1251
</Directory>
Alias /netams/ /usr/local/www/netams/
#<Directory "/usr/local/www/netams/cgi-bin">
<Directory "/usr/local/www/apache22/cgi-bin">
Options Indexes FollowSymLinks MultiViews ExecCGI
AllowOverride all
Order allow,deny
allow from all
DefaultLanguage ru
AddDefaultCharset WINDOWS-1251
</Directory>
AddHandler cgi-script .cgi
# end NeTAMS section
Код: Выделить всё
apachectl configtest
Syntax OK
Код: Выделить всё
free# ls -la /usr/local/www/netams/cgi-bin
total 116
drwxr-xr-x 4 www www 512 Oct 9 19:27 .
drwx--x--x 4 www www 512 Oct 9 18:36 ..
-rw-r--r-- 1 www www 203 Oct 9 18:39 .htaccess
-rwxr-xr-x 1 www www 4171 Oct 8 11:41 activate.cgi
-r--r--r-- 1 www www 1499 Oct 8 11:41 activate.tmpl
drwxr-xr-x 2 www www 1024 Oct 8 11:41 admin
-rwxr-xr-x 1 www www 414 Oct 9 19:27 admintool.cgi
-rwxr-xr-x 1 www www 505 Oct 8 11:41 config.cgi
drwxr-xr-x 2 www www 512 Oct 8 11:41 images
-rwxr-xr-x 1 www www 3778 Oct 8 11:41 login.cgi
-rwxr-xr-x 1 www www 3475 Oct 8 11:41 netams_api.pl
-rwxr-xr-x 1 www www 1140 Oct 8 11:41 netams_example.cgi
-rwxr-xr-x 1 www www 11079 Oct 8 11:41 netams_graph.cgi
-rwxr-xr-x 1 www www 21766 Oct 8 11:41 netams_html.cgi
-r--r--r-- 1 www www 3123 Oct 8 11:41 russian.res
-rwxr-xr-x 1 www www 35209 Oct 8 11:41 statistic.pl
-rwxr-xr-x 1 www www 9948 Oct 8 11:41 usertool.cgi
Код: Выделить всё
http://10.7.1.2/netams/stat
Код: Выделить всё
http://10.7.1.2/netams
Код: Выделить всё
Alias /netams /usr/local/www/netams/
<Directory "/usr/local/www/netams/">
AddType application/x-httpd-php .php
DirectoryIndex index.php index.html index.htm
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all
DefaultLanguage ru
AddDefaultCharset WINDOWS-1251
</Directory>
<Directory "/usr/local/www/apache22/cgi-bin">
Options Indexes FollowSymLinks MultiViews ExecCGI
AllowOverride all
Order allow,deny
allow from all
DefaultLanguage ru
AddDefaultCharset WINDOWS-1251
</Directory>
AddHandler cgi-script .cgi
Код: Выделить всё
#!/usr/local/bin/perl -w
#
# $Id: index.cgi,v 1.3 2008-01-02 13:29:36 anton Exp $
require "netams.cgi";
if ($action eq "save") {
$toppane = "<b>Save current configuration</b>";
netams_send("save");
$result=netams_read();
$p2.="<b><i>Applying:</i></b> save<hr>$result<br>\n";
$rightdata = "$p2";
} else {
$toppane = "<b>$L_select_to_do</b>";
}
netams_print();
Код: Выделить всё
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, some@admin and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Код: Выделить всё
Compilation failed in require at /usr/local/www/netams/cgi-bin/admin/index.cgi line 5.
Name "main::rightdata" used only once: possible typo at /usr/local/www/netams/cgi-bin/admin/index.cgi line 13.
Name "main::L_select_to_do" used only once: possible typo at /usr/local/www/netams/cgi-bin/admin/index.cgi line 15.
Name "main::action" used only once: possible typo at /usr/local/www/netams/cgi-bin/admin/index.cgi line 7.
Can't locate DBI.pm in @INC (@INC contains: /usr/local/lib/perl5/5.8.8/BSDPAN /usr/local/lib/perl5/site_perl/5.8.8/mach /usr/
BEGIN failed--compilation aborted at netams.cgi line 93.
Compilation failed in require at /usr/local/www/netams/cgi-bin/admin/index.cgi line 5.
schizoid писал(а):BSDPAN - есть?
Код: Выделить всё
p5-DBI-1.60.1 The perl5 Database Interface. Required for DBD::* modules
Код: Выделить всё
# locate DBI.pm
/usr/local/lib/perl5/site_perl/5.8.5/mach/Bundle/DBI.pm
/usr/local/lib/perl5/site_perl/5.8.5/mach/DBI.pm
/usr/local/lib/perl5/site_perl/5.8.8/mach/Bundle/DBI.pm
/usr/local/lib/perl5/site_perl/5.8.8/mach/DBI.pm