How do I configure HHVM for an apache compiled manually?

1

During the Ubuntu 12.04 upgrades, HHVM was updated and then asked to run the fast_cgi install command.

However when running 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 do I configure the fast_cgi installer to find this installation?

Here's part of the script below for a better understanding ( complete 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 I installed Apache / PHP using updated repositories, so I used apt-get itself.

That way the HHVM worked quietly.

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

>

If someone down vote , please explain why, so I "fix it". After all: I do not have crystal ball.

    
asked by anonymous 29.03.2014 / 01:32

2 answers

2

Here's a practical step-by-step:

  • Install 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
    
  • Install Apache2

    apt-get install apache2
    a2enmod proxy
    a2enmd proxy_fcgi
    
  • Install FastCGI

    apt-get install libapache2-mod-fastcgi
    a2enmod fastcgi
    update-rc.d hhvm-fastcgi defaults
    
  • 20.05.2014 / 14:42
    0

    Try replacing 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.

        
    18.02.2015 / 14:08