Страница 1 из 1

apache2 вопрос по статье

Добавлено: 2007-08-20 11:09:02
f0s
прочитал: http://www.lissyara.su/?id=1360

возникло несколько вопросов:

1) я помещаю скрипт php.sh в папку /usr/home/artpaint/www/cgi-bin/
права 555.
2) в конфиге httpd.conf указано:

Код: Выделить всё

Action application/x-httpd-fastphp /php-fcgi/php.sh
Action application/x-httpd-php /php-fcgi/php.sh
отсюда вопрос: эта папка откуда ищется? ибо при обращение к моему серверу получаю 404:

Код: Выделить всё

Not Found

The requested URL /php-fcgi/php.sh/1.php was not found on this server.

Apache/2.0.59 (FreeBSD) mod_fastcgi/2.4.2 Server at 192.168.10.8 Port 80

Re: apache2 вопрос по статье

Добавлено: 2007-08-20 11:13:26
Alex Keda
там в конфиге несколько алясов последовательно сделано.

Re: apache2 вопрос по статье

Добавлено: 2007-08-20 11:49:34
f0s
конец файла httpd.conf:

Код: Выделить всё

<IfModule mod_fastcgi.c>
        FastCgiConfig   -singleThreshold 30 -minProcesses 2 -restart \
                        -idle-timeout 400 -killInterval 200 -autoUpdate \
                        -pass-header HTTP_AUTHORIZATION
        FastCgiWrapper /usr/local/sbin/suexec
        FastCgiIpcDir /var/run/fastcgi
        Action application/x-httpd-fastphp /php-fcgi/php.sh
        Action application/x-httpd-php /php-fcgi/php.sh
        AddType application/x-httpd-fastphp     .php
        <Location /php-fcgi/>
                Options ExecCGI FollowSymLinks
                SetHandler fastcgi-script
        </Location>
</IfModule>

<Directory "/usr/home/*/www/data">
        Options         Indexes FollowSymLinks MultiViews
        AllowOverride   All
        Order           deny,allow
        Allow from      all
</Directory>

<Directory "/usr/home/*/www/cgi-bin">
        AllowOverride   None
        Options         None
        Order           allow,deny
        Allow from      all
</Directory>

DirectoryIndex index.php index.html index.htm

### Section 3: Virtual Hosts

NameVirtualHost *:80


#
<VirtualHost *:80>
    ServerAdmin admin@artpaint.spb.ru
    DocumentRoot /usr/home/artpaint/www/data/
    ServerName www.artpaint
    ErrorLog /var/log/httpd/httpd-error.log
    CustomLog /var/log/httpd/httpd-access.log combined
</VirtualHost>

Include etc/apache2/Includes/*.conf

в процессах тоже пусто:


Код: Выделить всё

[f0s@mail] /usr/local/etc/apache2/> ps -aux | grep http
root       842  0,0  0,1  3728   584  p0  R+   12:39     0:00,00 grep http
[f0s@mail] /usr/local/etc/apache2/> ps -aux | grep php-cgi
root       845  0,0  0,0   416   312  p0  R+   12:39     0:00,00 grep php-cgi
[f0s@mail] /usr/local/etc/apache2/> sockstat | grep /var/run/fastcgi
[f0s@mail] /usr/local/etc/apache2/>

однако:

Код: Выделить всё

[f0s@mail] /usr/local/etc/apache2/> telnet 192.168.10.8 80
Trying 192.168.10.8...
Connected to mail.artpaint.
Escape character is '^]'.
test
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>501 Method Not Implemented</title>
</head><body>
<h1>Method Not Implemented</h1>
<p>test to / not supported.<br />
</p>
<hr>
<address>Apache/2.0.59 (FreeBSD) mod_fastcgi/2.4.2 Server at www.artpaint Port 80</address>
</body></html>
Connection closed by foreign host.
[f0s@mail] /usr/local/etc/apache2/>

создаем Файл 1.php, в нем пишем

Код: Выделить всё

<? phpinfo(); ?>
кладем в /usr/home/artpaint/www/data

Код: Выделить всё

[f0s@mail] /usr/home/artpaint/www/data/> ll
total 2
-rw-r--r--  1 artpaint  artpaint  16 20 авг 11:30 1.php
[f0s@mail] /usr/home/artpaint/www/data/>
заходим бразуером с локалки на http://192.168.10.8/1.php

получаем 404:

Код: Выделить всё

Not Found

The requested URL /php-fcgi/php.sh/1.php was not found on this server.
Apache/2.0.59 (FreeBSD) mod_fastcgi/2.4.2 Server at 192.168.10.8 Port 80
в логах:

Код: Выделить всё

[Mon Aug 20 12:42:37 2007] [error] [client 192.168.10.100] (2)No such file or directory: FastCGI: stat() of "/usr/home/artpaint/www/data/php-fcgi" failed, referer: http://192.168.10.8/
итого он эту папку в итоге ищет не там...

Re: apache2 вопрос по статье

Добавлено: 2007-08-20 16:17:43
Alex Keda

Код: Выделить всё

        Alias           /php-fcgi/      /usr/home/my-domain/www/cgi-bin/
ка ты думаешь, зачем это в конфиге вируталхоста в статье?

Re: apache2 вопрос по статье

Добавлено: 2007-08-20 19:33:46
f0s
это не было в статье :)) точно говорю, я не видел пкм этого :)) а сейчас появилось :)

Re: apache2 вопрос по статье

Добавлено: 2007-08-20 19:39:36
Alex Keda
f0s писал(а):это не было в статье :)) точно говорю, я не видел пкм этого :)) а сейчас появилось :)
ну знаешьли... :))