The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

форумы  помощь  поиск  регистрация  майллист  ВХОД  слежка  RSS
"nginx + php"
Вариант для распечатки  
Пред. тема | След. тема 
Форумы WEB технологии (Public)
Изначальное сообщение [Проследить за развитием треда]

"nginx + php"  
Сообщение от L0n3R4ng3r (ok) on 08-Июн-07, 20:27 
пересобрал пхп с --enable-fastcgi --prefix=/opt/php
делаю
# /bin/su -m -c "/opt/php/bin/php -q -b 127.0.0.1:8888" root &

# ps aux | grep php
root      6867  0.0  0.2   3328  1104 pts/1    S    19:22   0:00 /bin/su -m -c /opt/php/bin/php -q -b 127.0.0.1:8888 root
root      6868  0.1  1.0  14596  4804 pts/1    S    19:22   0:00 /opt/php/bin/php -q -b 127.0.0.1:8888
root      6875  0.0  0.1   2680   708 pts/1    R+   19:23   0:00 grep --colour=auto php

# uname -a
Linux L0n3rL4P 2.6.18-gentoo-r6 #2 Sun Jun 4 06:19:59 EEST 2028 i686 AMD Turion(tm) 64 Mobile Technology MK-36 AuthenticAMD GNU/Linux

# cat /etc/nginx/nginx.conf
user nginx nginx;
worker_processes 1;

error_log /var/log/nginx/error_log info;

events {
        worker_connections  8192;
        use epoll;
}

http {
        include         /etc/nginx/mime.types;
        default_type    application/octet-stream;

        log_format main
                '$remote_addr - $remote_user [$time_local] '
                '"$request" $status $bytes_sent '
                '"$http_referer" "$http_user_agent" '
                '"$gzip_ratio"';

        client_header_timeout   10m;
        client_body_timeout     10m;
        send_timeout            10m;

        connection_pool_size            256;
        client_header_buffer_size       1k;
        large_client_header_buffers     4 2k;
        request_pool_size               4k;

        gzip on;
        gzip_min_length 1100;
        gzip_buffers    4 8k;
        gzip_types      text/plain;

        output_buffers  1 32k;
        postpone_output 1460;

        sendfile        on;
        tcp_nopush      on;
        tcp_nodelay     on;

        keepalive_timeout       75 20;

        ignore_invalid_headers  on;

        index index.html;

        server {
                listen          127.0.0.1;
                server_name     localhost;

                access_log      /var/log/nginx/localhost.access_log main;
                error_log       /var/log/nginx/localhost.error_log;

                location /var/www/ {
                    root stat;
                    index index.html index.htm index.php;
                    }

                location ~ \.php$ {
                    fastcgi_pass   127.0.0.1:8888;
                    fastcgi_index  index.php;

                    fastcgi_param  SCRIPT_FILENAME  /var/www/stat$fastcgi_script_name;
                    fastcgi_param  QUERY_STRING     $query_string;
                    fastcgi_param  REQUEST_METHOD   $request_method;
                    fastcgi_param  CONTENT_TYPE     $content_type;
                    fastcgi_param  CONTENT_LENGTH   $content_length;
                }
        }
}

# /etc/init.d/nginx start
* Checking nginx' configuration ...
2007/06/08 19:25:22 [emerg] 6921#0: unknown directive "fastcgi_pass" in /etc/nginx/nginx.conf:61
2007/06/08 19:25:22 [emerg] 6921#0: the configuration file /etc/nginx/nginx.conf test failed
* failed, please correct errors above                                                        [ !! ]


Подскажите что не так. заранее спасибо

Высказать мнение | Ответить | Правка | Наверх | Cообщить модератору

 Оглавление

  • nginx + php, Lucf3r, 14:07 , 12-Июн-07, (1)  
    • nginx + php, L0n3R4ng3r, 20:02 , 27-Июн-07, (2)  
      • nginx + php, Lucf3r, 11:01 , 28-Июн-07, (3)  

Сообщения по теме [Сортировка по времени, UBB]


1. "nginx + php"  
Сообщение от Lucf3r email(ok) on 12-Июн-07, 14:07 
>пересобрал пхп с --enable-fastcgi --prefix=/opt/php
>делаю
># /bin/su -m -c "/opt/php/bin/php -q -b 127.0.0.1:8888" root &
>
># ps aux | grep php
>root      6867  0.0  0.2  
> 3328  1104 pts/1    S  
> 19:22   0:00 /bin/su -m -c /opt/php/bin/php -q -b
>127.0.0.1:8888 root
>root      6868  0.1  1.0  
>14596  4804 pts/1    S    
>19:22   0:00 /opt/php/bin/php -q -b 127.0.0.1:8888
>root      6875  0.0  0.1  
> 2680   708 pts/1    R+  
> 19:23   0:00 grep --colour=auto php
>
># uname -a
>Linux L0n3rL4P 2.6.18-gentoo-r6 #2 Sun Jun 4 06:19:59 EEST 2028 i686 AMD
>Turion(tm) 64 Mobile Technology MK-36 AuthenticAMD GNU/Linux
>
># cat /etc/nginx/nginx.conf
>user nginx nginx;
>worker_processes 1;
>
>error_log /var/log/nginx/error_log info;
>
>events {
>        worker_connections  8192;
>        use epoll;
>}
>
>http {
>        include    
>     /etc/nginx/mime.types;
>        default_type    
>application/octet-stream;
>
>        log_format main
>            
>    '$remote_addr - $remote_user [$time_local] '
>            
>    '"$request" $status $bytes_sent '
>            
>    '"$http_referer" "$http_user_agent" '
>            
>    '"$gzip_ratio"';
>
>        client_header_timeout   10m;
>
>        client_body_timeout    
> 10m;
>        send_timeout    
>        10m;
>
>        connection_pool_size    
>        256;
>        client_header_buffer_size    
>   1k;
>        large_client_header_buffers    
> 4 2k;
>        request_pool_size    
>          
>4k;
>
>        gzip on;
>        gzip_min_length 1100;
>        gzip_buffers    
>4 8k;
>        gzip_types    
>  text/plain;
>
>        output_buffers  1 32k;
>
>        postpone_output 1460;
>
>        sendfile    
>    on;
>        tcp_nopush    
>  on;
>        tcp_nodelay    
> on;
>
>        keepalive_timeout    
>   75 20;
>
>        ignore_invalid_headers  on;
>
>        index index.html;
>
>        server {
>            
>    listen      
>   127.0.0.1;
>            
>    server_name     localhost;
>
>            
>    access_log      /var/log/nginx/localhost.access_log
>main;
>            
>    error_log      
>/var/log/nginx/localhost.error_log;
>
>            
>    location /var/www/ {
>            
>        root stat;
>            
>        index index.html index.htm
>index.php;
>            
>        }
>
>            
>    location ~ \.php$ {
>            
>        fastcgi_pass  
>127.0.0.1:8888;
>            
>        fastcgi_index  index.php;
>
>
>            
>        fastcgi_param  SCRIPT_FILENAME
> /var/www/stat$fastcgi_script_name;
>            
>        fastcgi_param  QUERY_STRING
>    $query_string;
>            
>        fastcgi_param  REQUEST_METHOD
>  $request_method;
>            
>        fastcgi_param  CONTENT_TYPE
>    $content_type;
>            
>        fastcgi_param  CONTENT_LENGTH
>  $content_length;
>            
>    }
>        }
>}
>
># /etc/init.d/nginx start
> * Checking nginx' configuration ...
>2007/06/08 19:25:22 [emerg] 6921#0: unknown directive "fastcgi_pass" in /etc/nginx/nginx.conf:61
>2007/06/08 19:25:22 [emerg] 6921#0: the configuration file /etc/nginx/nginx.conf test failed
> * failed, please correct errors above      
>          
>          
>          
>          
>      [ !! ]
>
>
>Подскажите что не так. заранее спасибо


Похоже, что Nginx был собран с опцией "--without-http_fastcgi_module". Попытайтесь пересобрать его, я собираю nginx так:

./configure --with-zlib=../zlib-1.2.3 --prefix=/usr/local/nginx --with-http_ssl_module
make
make install

При этом использую последнюю библиотеку zlib. Скачать zlib-1.2.3 можете с меня:
http://x-shops.com/distr/zlib-1.2.3.tar.gz

Nginx 0.5.25:
http://x-shops.com/distr/nginx-0.5.25.tar.gz

PHP 4.4.7:
http://x-shops.com/distr/php-4.4.7.tar.gz

Suhosin patch:
http://x-shops.com/distr/suhosin-patch-4.4.7-0.9.6.patch

Если не помогло, пришлите результат "nginx -V":

[root@206-225-90-79 /]# /usr/local/nginx/sbin/nginx -V
nginx version: nginx/0.5.25
built by gcc 4.0.2 20051125 (Red Hat 4.0.2-8)
configure arguments: --with-zlib=../zlib-1.2.3 --prefix=/usr/local/nginx --with-http_ssl_module

Высказать мнение | Ответить | Правка | Наверх | Cообщить модератору

2. "nginx + php"  
Сообщение от L0n3R4ng3r (??) on 27-Июн-07, 20:02 
>>пересобрал пхп с --enable-fastcgi --prefix=/opt/php
>>делаю
>># /bin/su -m -c "/opt/php/bin/php -q -b 127.0.0.1:8888" root &
>>
>># ps aux | grep php
>>root      6867  0.0  0.2  
>> 3328  1104 pts/1    S  
>> 19:22   0:00 /bin/su -m -c /opt/php/bin/php -q -b
>>127.0.0.1:8888 root
>>root      6868  0.1  1.0  
>>14596  4804 pts/1    S    
>>19:22   0:00 /opt/php/bin/php -q -b 127.0.0.1:8888
>>root      6875  0.0  0.1  
>> 2680   708 pts/1    R+  
>> 19:23   0:00 grep --colour=auto php
>>
>># uname -a
>>Linux L0n3rL4P 2.6.18-gentoo-r6 #2 Sun Jun 4 06:19:59 EEST 2028 i686 AMD
>>Turion(tm) 64 Mobile Technology MK-36 AuthenticAMD GNU/Linux
>>
>># cat /etc/nginx/nginx.conf
>>user nginx nginx;
>>worker_processes 1;
>>
>>error_log /var/log/nginx/error_log info;
>>
>>events {
>>        worker_connections  8192;
>>        use epoll;
>>}
>>
>>http {
>>        include    
>>     /etc/nginx/mime.types;
>>        default_type    
>>application/octet-stream;
>>
>>        log_format main
>>            
>>    '$remote_addr - $remote_user [$time_local] '
>>            
>>    '"$request" $status $bytes_sent '
>>            
>>    '"$http_referer" "$http_user_agent" '
>>            
>>    '"$gzip_ratio"';
>>
>>        client_header_timeout   10m;
>>
>>        client_body_timeout    
>> 10m;
>>        send_timeout    
>>        10m;
>>
>>        connection_pool_size    
>>        256;
>>        client_header_buffer_size    
>>   1k;
>>        large_client_header_buffers    
>> 4 2k;
>>        request_pool_size    
>>          
>>4k;
>>
>>        gzip on;
>>        gzip_min_length 1100;
>>        gzip_buffers    
>>4 8k;
>>        gzip_types    
>>  text/plain;
>>
>>        output_buffers  1 32k;
>>
>>        postpone_output 1460;
>>
>>        sendfile    
>>    on;
>>        tcp_nopush    
>>  on;
>>        tcp_nodelay    
>> on;
>>
>>        keepalive_timeout    
>>   75 20;
>>
>>        ignore_invalid_headers  on;
>>
>>        index index.html;
>>
>>        server {
>>            
>>    listen      
>>   127.0.0.1;
>>            
>>    server_name     localhost;
>>
>>            
>>    access_log      /var/log/nginx/localhost.access_log
>>main;
>>            
>>    error_log      
>>/var/log/nginx/localhost.error_log;
>>
>>            
>>    location /var/www/ {
>>            
>>        root stat;
>>            
>>        index index.html index.htm
>>index.php;
>>            
>>        }
>>
>>            
>>    location ~ \.php$ {
>>            
>>        fastcgi_pass  
>>127.0.0.1:8888;
>>            
>>        fastcgi_index  index.php;
>>
>>
>>            
>>        fastcgi_param  SCRIPT_FILENAME
>> /var/www/stat$fastcgi_script_name;
>>            
>>        fastcgi_param  QUERY_STRING
>>    $query_string;
>>            
>>        fastcgi_param  REQUEST_METHOD
>>  $request_method;
>>            
>>        fastcgi_param  CONTENT_TYPE
>>    $content_type;
>>            
>>        fastcgi_param  CONTENT_LENGTH
>>  $content_length;
>>            
>>    }
>>        }
>>}
>>
>># /etc/init.d/nginx start
>> * Checking nginx' configuration ...
>>2007/06/08 19:25:22 [emerg] 6921#0: unknown directive "fastcgi_pass" in /etc/nginx/nginx.conf:61
>>2007/06/08 19:25:22 [emerg] 6921#0: the configuration file /etc/nginx/nginx.conf test failed
>> * failed, please correct errors above      
>>          
>>          
>>          
>>          
>>      [ !! ]
>>
>>
>>Подскажите что не так. заранее спасибо
>
>
>Похоже, что Nginx был собран с опцией "--without-http_fastcgi_module". Попытайтесь пересобрать его, я
>собираю nginx так:
>
>./configure --with-zlib=../zlib-1.2.3 --prefix=/usr/local/nginx --with-http_ssl_module
>make
>make install
>
>При этом использую последнюю библиотеку zlib. Скачать zlib-1.2.3 можете с меня:
>http://x-shops.com/distr/zlib-1.2.3.tar.gz
>
>Nginx 0.5.25:
>http://x-shops.com/distr/nginx-0.5.25.tar.gz
>
>PHP 4.4.7:
>http://x-shops.com/distr/php-4.4.7.tar.gz
>
>Suhosin patch:
>http://x-shops.com/distr/suhosin-patch-4.4.7-0.9.6.patch
>
>Если не помогло, пришлите результат "nginx -V":
>
>[root@206-225-90-79 /]# /usr/local/nginx/sbin/nginx -V
>nginx version: nginx/0.5.25
>built by gcc 4.0.2 20051125 (Red Hat 4.0.2-8)
>configure arguments: --with-zlib=../zlib-1.2.3 --prefix=/usr/local/nginx --with-http_ssl_module


# nginx -V
nginx version: nginx/0.5.5
configure arguments: --prefix=/usr --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access_log --error-log-path=/var/log/nginx/error_log --pid-path=/var/run/nginx.pid --http-client-body-temp-path=/var/tmp/nginx/client --http-proxy-temp-path=/var/tmp/nginx/proxy --http-fastcgi-temp-path=/var/tmp/nginx/fastcgi --with-md5-asm --with-md5=/usr/include --with-http_realip_module --with-http_ssl_module --with-http_perl_module

А что за suhosin-patch?

Высказать мнение | Ответить | Правка | Наверх | Cообщить модератору

3. "nginx + php"  
Сообщение от Lucf3r email(??) on 28-Июн-07, 11:01 
>А что за suhosin-patch?

Это набор security патчей на PHP, так называемый "Hardened PHP Project":

The Hardened-PHP Project was founded to protect PHP users and servers against present and future security holes.

http://www.hardened-php.net/suhosin/index.html

С Feature List можно ознакомиться здесь:
http://www.hardened-php.net/suhosin/a_feature_list.html

Высказать мнение | Ответить | Правка | Наверх | Cообщить модератору

Архив | Удалить

Индекс форумов | Темы | Пред. тема | След. тема
Оцените тред (1=ужас, 5=супер)? [ 1 | 2 | 3 | 4 | 5 ] [Рекомендовать для помещения в FAQ]




Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2025 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру