Como posso instalar o php5-fpm e o apache e configurar o vache do apache?

0

Não encontro uma descrição válida de como instalar o vhost do apache corretamente. Todos podem me ajudar?

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    ServerName webpage.com
    ServerAlias www.webpage.com

    DocumentRoot /home/userdir/webpage.com

    Alias /php5-fcgi /usr/lib/cgi-bin
    #Alias /php-fpm /home/userdir/webpage.com/php-fpm
    FastCgiExternalServer /home/userdir/webpage.com/php5-fcgi -flush -pass-header HTTP_AUTHORIZATION -host 127.0.0.1:11000
    #AddType application/x-httpd-fastphp5 .php
    #Action appication/x-httpd-fastphp5 /php-fpm
    Action php5-fcgi /php5-fcgi
    AddHandler php5-fcgi .php
    ScriptAlias php5-fcgi /home/userdir/webpage.com/

    #DirectoryIndex index.php index.html

    <Directory />
        Options FollowSymLinks +ExecCGI +SymLinksIfOwnerMatch
        #DirectoryIndex index.php
        AllowOverride None
    </Directory>

    <Directory /home/userdir/webpage.com/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        #DirectoryIndex index.php
        Order allow,deny
        allow from all
    </Directory>


#   ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
        AllowOverride None
        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
        Order allow,deny
        Allow from all
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

E a saída no navegador:

Not Found

The requested URL /php5-fcgi/index.php was not found on this server.  

E o log de erros do apache:

O arquivo não existe: /usr/lib/cgi-bin/index.php

    
por turbod 26.06.2013 / 08:07

1 resposta

0

Crie o arquivo /usr/lib/cgi-bin/index.php e coloque algum texto nele como "teste" e salve-o. Tente novamente. Além disso, não acho que você deva usar um caminho de URL como / php5-fcgi. Apenas http://localhost/index.php (ou .html) deve ser feito.

    
por SPRBRN 26.06.2013 / 08:46