Patrick Maciel
Patrick Maciel

Reputation: 4944

How to configure HHVM with Apache compiled from source?

Today, when HHVM has been updated (Ubuntu 12.04 x64), I try run the fast_cgi install command. Like below:

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

My apache was not found because it's in different location/folder: /etc/apache247/

How can I configure this install for a custom apache?

The script for check apache installation is that:

#!/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
}

Sorry for my english.

Upvotes: 0

Views: 1653

Answers (1)

user3477804
user3477804

Reputation:

You can follow the instructions on the HHVM Wiki to manually configure Apache to talk FastCGI to HHVM.

The installation process comes down to enabling the mod_proxy and mod_proxy_fcgi modules in Apache, then adding ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/path/to/your/www/root/goes/here/$1 to the VirtualHost you want to run HHVM on.

Upvotes: 1

Related Questions