Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I don't find a valid a description how can I install configure the apache vhost correctly. Can everybody help me?

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

And the output in the browser:

Not Found

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

And the apache error log:

File does not exist: /usr/lib/cgi-bin/index.php

share|improve this question
    
First make clear what you have tried. Then explain what the problem is - installing php5-fpm and apache, or configuring the vhost. –  SPRBRN Jun 26 '13 at 8:14
    
The problem I can't configure properly the vhost. –  turbod Jun 26 '13 at 8:18
    
This is a lot better! If you start out like this, it saves us from trying to explain stuff that you already have working. That's a waste of our/my time, and for me a reason not to put more effort in it. –  SPRBRN Jun 26 '13 at 8:49

1 Answer 1

Create the file /usr/lib/cgi-bin/index.php and put some text in it like "test", then save it. Try again. Furthermore I don't think that you should use a url path like /php5-fcgi. Just http://localhost/index.php (or .html) should do.

share|improve this answer
    
I use the webpage.com –  turbod Jun 26 '13 at 9:10
    
I don't understand what you mean. –  SPRBRN Jun 26 '13 at 9:15
    
In don't use the /php5-fcgi in the url. –  turbod Jun 26 '13 at 9:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.