Open main menu
MediaWiki-Vagrant now serves wikis using HHVM by default. The notes below are left as historical record of the process for older MediaWiki-Vagrant installs.

With the latest version of MediaWiki-Vagrant, it should be possible to enable HHVM automatically by running vagrant enable-role hhvm and then reprovisioning.[1]

If you need to do it manually for some reason, the following steps install HHVM in Vagrant and configure it to work with the web server. (Add sudo as necessary.)

  • Install the prebuilt HHVM package for Ubuntu 12.04 using the instructions at
  • Make HHVM start automatically at boot time with sudo update-rc.d hhvm defaults.
  • Install libapache2-mod-fastcgi using sudo apt-get install libapache2-mod-fastcgi.
    • You may need to add the multiverse repository to /etc/apt/sources.list. For example:
deb precise main multiverse universe
deb precise-updates main multiverse universe
deb precise-security main universe multiverse
  • Create the directory /var/www/fastcgi and make it writeable by the web server. (I just did chmod 777 fastcgi. There is probably a better way to do this, but since Vagrant is a local VM there isn't much security risk.)
  • Add the following to /etc/apache2/httpd.conf (modified from
<IfModule mod_fastcgi.c>
    Alias /hhvm.fastcgi /var/www/fastcgi/hhvm.fastcgi
    FastCGIExternalServer /var/www/fastcgi/hhvm.fastcgi -host -pass-header Authorization -idle-timeout 300
    <Directory "/var/www/fastcgi">
        <Files "hhvm.fastcgi">
            Order deny,allow

    AddHandler hhvm-hack-extension .hh
    AddHandler hhvm-php-extension .php

    Action hhvm-hack-extension /hhvm.fastcgi virtual
    Action hhvm-php-extension /hhvm.fastcgi virtual
  • Disable the PHP module in Apache (otherwise it seems to shadow HHVM) using sudo a2dismod php5.
  • Enable mod_actions using sudo a2enmod actions.
  • Restart the Vagrant box and navigate to http://localhost:8080/wiki/Special:Version. The version for PHP under Installed software should contain the string "hiphop".


  1. bug 63683 has been fixed.