Ответы пользователя по тегу FastCGI
  • Установка двух и более версий PHP работающих как FPM/FastCGI?

    Sky4eg
    @Sky4eg Автор вопроса
    Web разработчик
    Что имеем: Ubuntu Server 12.04
    установлен PHP 5.3.10 в связке fastcgi + php-fpm все из репов, в phpinfo получаем
    Server API FPM/FastCGI
    Далее собираю из сорцов 5.2.17 с --enable-fpm, нактаываю патч 0.5.14
    Получаю phpinfo
    Server API CGI/FastCGI
    но при этом:
    php-fpm active
    php-fpm version 0.5.14

    как заставить работать с Server API FPM/FastCGI

    P.S. И еще вопрос: в php5.3.10 конфиг пхп-фпм создан по типу ini файлов, в версии 5.2.17 по типу xml. Как сделать конфиг файл в ini стиле?
    Ответ написан
    Комментировать
  • Как настроить nginx + php_fastcgi с функциональностью Apache_mpm_itk + mod_php?

    Sky4eg
    @Sky4eg
    Web разработчик
    Я делал несколько иначе. Вот пример на ubuntu

    фрагмент конфига сайта
    /etc/nginx/sites-available/site.ru

     location ~ \.php$ {
                    fastcgi_split_path_info ^(.+\.php)(/.+)$;
                    # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
    
                    # With php5-cgi alone:
                    #fastcgi_pass 127.0.0.1:9000;
                    # With php5-fpm:
                    fastcgi_pass unix:/var/run/php5-fpm.sock;
                    fastcgi_index index.php;
                    include fastcgi_params;
            }
    


    далее фрагмент
    /etc/php5/fpm/pool.d/site.ru.conf

    ; Start a new pool named 'www'.
    ; the variable $pool can we used in any directive and will be replaced by the
    ; pool name ('www' here)
    [site.ru]
    
    ...
    
    ; Unix user/group of processes
    ; Note: The user is mandatory. If the group is not set, the default user's group
    ;       will be used.
    user = sky
    group = sky
    
    ...
    
    ; The address on which to accept FastCGI requests.
    ; Valid syntaxes are:
    ;   'ip.add.re.ss:port'    - to listen on a TCP socket to a specific address on
    ;                            a specific port;
    ;   'port'                 - to listen on a TCP socket to all addresses on a
    ;                            specific port;
    ;   '/path/to/unix/socket' - to listen on a unix socket.
    ; Note: This value is mandatory.
    ;listen = 127.0.0.1:9000
    listen = /var/run/php5-fpm.sock
    
    ...
    
    ; Set permissions for unix socket, if one is used. In Linux, read/write
    ; permissions must be set in order to allow connections from a web server. Many
    ; BSD-derived systems allow connections regardless of permissions.
    ; Default Values: user and group are set as the running user
    ;                 mode is set to 0666
    listen.owner = sky
    listen.group = sky
    listen.mode = 0666
    
    ...
    


    После это сайт работает от имени пользователя, в данном случае sky
    Ответ написан
    1 комментарий