How do I set up HHVM for a manually compiled apache?

Asked

Viewed 347 times

1

During the updates of Ubuntu 12.04, the HHVM was updated and then asked to run the installation command for the fast_cgi.

However when executing I received the following error:

➜  ~  sudo /usr/share/hhvm/install_fastcgi.sh 
Checking if Apache is installed
WARNING: Couldn't find Apache2 configuration paths, not configuring
Checking if Nginx is installed
Nginx not found

This was because my Apache was compiled manually and installed in a different directory: /etc/apache247/.

How I configure the installer of fast_cgi to find this facility?

Follow part of the script below, for a better understanding (full script):

#!/bin/bash

if [ -f /etc/init.d/hhvm ]
then
        /etc/init.d/hhvm start
fi

#!/bin/bash

apache_check_installed() {
        echo "Checking if Apache is installed"
        if [ \( ! -d /etc/apache2/mods-enabled \) -o \( ! -d /etc/apache2/mods-available \) ]
        then
                echo "WARNING: Couldn't find Apache2 configuration paths, not configuring"
                return 1
        fi
        echo "Detected Apache installation"
        return 0
}

Ubuntu 14.04 [EDIT]

I recently upgraded Ubuntu to version 14.04, and installed Apache/PHP using updated repositories, so I used apt-get even.

That way the HHVM worked smoothly.

But the reason for this question at the time was: how to use HHVM with apache compiled manually, since there is no mods-enabled folder, among others.. the structure is different.


If anyone gives down vote, Please explain the reason, so that I "fix this". After all: I don’t have crystal ball.

2 answers

2

Follow a practical step by step:

  1. Install the HHVM

    echo deb http://dl.hhvm.com/ubuntu saucy main | sudo tee /etc/apt/sources.list.d/hhvm.list
    sudo apt-get update
    sudo apt-get install hhvm-fastcgi
    
  2. Install the Apache2

    apt-get install apache2
    a2enmod proxy
    a2enmd proxy_fcgi
    
  3. Install the Fastcgi

    apt-get install libapache2-mod-fastcgi
    a2enmod fastcgi
    update-rc.d hhvm-fastcgi defaults
    
  • The only way is with apache installed through the apt-get? Anyway, right after this post and as soon as it released version 14.04 I installed apache through a newer repository using the apt-get and it worked. But my doubt was regarding the installation of HHVM using apache complicated manually in an alternative folder. Anyway, thank you.

  • I went for the most practical, although I knew what you needed but I did not find any documentation about your doubt

0

Try to replace this line:

if [ \( ! -d /etc/apache2/mods-enabled \) -o \( ! -d /etc/apache2/mods-available \) ]

For this:

if [ \( ! -d /etc/apache247/mods-enabled \) -o \( ! -d /etc/apache247/mods-available \) ]

The script is not finding the path because you compiled it manually and installed it in another location. Changing the location in the script should solve your problem.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.