1

I've been able to rather easily get facebooks hhvm working from prebuilt debian packages as well as compile it, and afterwards to run it behind apache as a proxy. The problem with the proxy setup is though, that I can't get response headers other than http status code 200 - like 304 for example - through. It's not the proxy config of apache, but something wrt hhvm and apache interact, or even in hhvm.

Anyway, HHVM officially stopped supporting the standalone server, and they're moving over to fastcgi, and as all of our servers are running Debian, I don't have access to mod_proxy_fastcgi without compiling it (the only backports I found of apache 2.4 don't have mod_proxy_fastcgi backported unfortunately).

So I'm currently trying to get HHVM to run behind the old mod_fastcgi with apache 2.2. But currently I'm only getting "connect() failed" in the error log of apache, while hhvm is listening on :::1080

The important part of my apache config is

RemoveHandler application/x-httpd-php FastCgiExternalServer /home/www/hhvm/hostname/htdocs/php5.fcgi -flush -host ip6-localhost:1080 AddType application/x-hhtpd-fastphp5 .php Action application/x-httpd-fastphp5 /php5.fcgi Alias /php5.fcgi /home/www/hhvm/hostname/htdocs/php5.fcgi 

netstat also lists hhvm as listening on :::1080 and I can connect to it via telnet

Any Ideas on what I need to change so it works?

P.S.: Unfortunately I don't have enough rep for creating a hhvm tag here

P.P.S.: Originally posted on stackoverflow here: https://stackoverflow.com/questions/20410432/hhvm-through-apache-mod-fastcgi-on-debian

4
  • Why is libapache2-mod-fcgid not suitable? Commented Dec 6, 2013 at 18:09
  • Because it doesn't have the external server option as mod_fastcgi has (hhvm is run as one server which does the threading itself, while the typical fcgid lifecycle is so that the mod spawns processes which then process a set number of requests till they get killed automatically and restarted) Commented Dec 7, 2013 at 22:47
  • @ptman Yes, that's the package I'm using ... ? Commented Dec 9, 2013 at 8:10
  • I'm observing similar issue with Nginx+Fcgi. Script headers are relayed back, except for the status codes. 404, 403, etc. are treated as 200 by Nginx. For the time being, I'm using custom headers X-Status, for example, as a workaround. Commented Jan 21, 2014 at 2:03

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.