Как я могу установить php5-fpm и apache и настроить apache vhost?

Я не могу найти правильное описание, как я могу правильно настроить Apache vhost. Все могут мне помочь?

<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>

И вывод в браузере:

Not Found

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

И журнал ошибок apache:

Файл не существует: / usr / Библиотека / CGI-BIN / index.php

0
задан 26 June 2013 в 12:20

1 ответ

Создайте файл /usr/lib/cgi-bin/index.php и вставьте в него текст, например «test», затем сохраните его. Попробуйте снова. Кроме того, я не думаю, что вы должны использовать URL-путь, например / php5-fcgi. Просто http://localhost/index.php (или .html) должен сделать.

0
ответ дан 26 June 2013 в 12:20

Другие вопросы по тегам:

Похожие вопросы: