Configuring HHVM 3.7 with Apache 2.4 gives me a 404? Configuring HHVM 3.7 with Apache 2.4 gives me a 404? apache apache

Configuring HHVM 3.7 with Apache 2.4 gives me a 404?


I know it's been two months already, but maybe it helps someone else (I had a similar issue occur many times when configuring HHVM + Apache2).

  1. Try to enable the vhost if you haven't yet done so. Issue sudo a2ensite www.example.com and reload apache afterwards with sudo service apache2 reload.
  2. If the vhost is ok and you have your browser requests visible in the vhost access log, then it means that it's not Apache2 that's the culprit there.
  3. So if you're still with me and the first two steps didn't help, try the following, although in HHVM 3.7 it shoulnd't be the case anymore (but it might, I just follow the try-and-check method when it comes to configuring HHVM, and it usually works). Open /etc/hhvm/server.ini and append the following line to that file:

    hhvm.server.fix_path_info = true
  4. After changing the HHVM's configuration, issue sudo service hhvm restart. Then try to refresh your website. It should be all good.

I had similar issues and back then it was the most common fix on all webservers I configured to work with HHVM. But, after the latest updates, I had to comment that line out of my hhvm server.ini in order for my code to work - I read that they have somehow changed the parameters of the server and this parameter does no good anymore, AFAIK.

I have also tried to put that line in /etc/hhvm/php.ini but as far as I remember, it should go to server.ini because it's a server parameter.

So. Try it and let me know if that helped. If not then please issue the following commands on your webserver and paste the output here, so I can see if you have the necessary modules installed

ls  /etc/apache2/mods-available | grep -E 'proxy|alias|fcgi|hhvm'ls  /etc/apache2/mods-enabled | grep -E 'proxy|alias|fcgi|hhvm'

Oh, and please include your full HHVM and Apache2 version output:

hhvm --versionapache2 -v