3

I've tried to set up an Apache 2.4 on Debian Wheezy to make calls to Hack/HHVM using mod_proxy / mod_proxy_fcgi according to this article.

The installation of HHVM was through the APT package manager. When I run a single .hack-file using

hhvm test.hack

with test.hack content

<?hh echo "test";

the output is as expected.

Now I start the HHVM fastcgi server using

hhvm --mode server -vServer.Type=fastcgi -vServer.Port=9001

and putting this to my testing vHost in the Apache configuration file:

ProxyPassMatch ^/(.*.hack(/.*)?)$ fcgi://127.0.0.1:9001/home/web/test/$1

After restarting Apache, I verified that it works by requesting a .hack-file which does not exists. I get a 404 Not Found from the HHVM fastcgi server, it looks different than the default Apache 404 page.

When I request my test.hack-file, then Apache starts 'loading forever'. If I kill the fastcgi in the background, it immediately stops loading and offers me the test.hack as a download with the content I entered (<?hh echot "test";).

I'm using PHP5-FPM with exactly the same ProxyPassMatch line, except the mime file extension and the port, of course. And it works perfectly there.

The error.log contains nothing special.

The Wavelength
  • 578
  • 2
  • 9
  • 24

1 Answers1

0

After installing HHVM 3.0 which has been released today this issue has been fixed. Works without changing any of my configuration so this fault must be caused by HHVM 2.x.

The Wavelength
  • 578
  • 2
  • 9
  • 24