Setting up HHVM 3.7 with Apache 2.4 gives me 404?

I canโ€™t configure HHVM and Apache, it keeps giving me 404 error not found. My configuration file for the website is saved as www.example.com.conf , it contains:

 <VirtualHost *:80> ServerName website.com ServerAdmin mail@website.com DocumentRoot /var/www/website.com/public_html/ ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/var/www/website.com.com/public_html/$1 ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost> 

Please note that I deleted my actual website name, but this is for the subdomain, so this is: subdomain.xyz.com . I tried to find how to fix it, but everything I tried did not seem to work; even problems with GitHub posted in the official repository do not seem to work. I also did not change the default apache configuration, the only thing I changed was the root directory of my site, which does a lot for the directory in the configuration file above.

Any ideas? Thanks.

+7
php apache hhvm
source share
1 answer

I know that two months have passed, but maybe this helps someone else (I had a similar problem that occurs many times when configuring HHVM + Apache2).

  • Try enabling vhost if you havenโ€™t already. Run sudo a2ensite www.example.com and restart apache after sudo service apache2 reload .
  • If vhost is OK and your browser requests are displayed in the vhost access log, this means that it is not Apache2.
  • So, if you are still with me and the first two steps did not help, try the following, although this is not the case in HHVM 3.7 (but it may be, I just follow the -and-check attempt when it comes to setting up HHVM, and usually it works). Open /etc/hhvm/server.ini and add the following line to this file:

     hhvm.server.fix_path_info = true 
  • After changing the HHVM configuration, enter sudo service hhvm restart . Then try updating your site. Everything should be fine.

I had similar problems, and then it was the most common solution for all the web servers that I configured to work with HHVM. But after the latest updates, I had to comment on this line from my hhvm server.ini in order for my code to work - I read that they somehow changed the server settings, and this parameter no longer helps, AFAIK.

I also tried putting this line in /etc/hhvm/php.ini , but as far as I remember, it should go to server.ini because it is a server parameter.

So. Try it and let me know if that helps. If not, then please run the following commands on your web server and paste this output here so that I can make sure that 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 indicate the full version of HHVM and Apache2 version:

 hhvm --version apache2 -v 
0
source share

All Articles