How to configure FastCGI for HHVM on a LEMP server

  • Posted on June 15, 2014
  • obdo32Asked by obdo32

I have been trying to get a LEMP server up and running with HHVM but after I install everything the always says:

root@Threed:~# sudo /usr/share/hhvm/ Checking if Apache is installed WARNING: Couldn’t find Apache2 configuration paths, not configuring Checking if Nginx is installed Detected Nginx installation Checking for custom Nginx configuration WARNING: Detected clashing configuration. Look at /etc/nginx/hhvm.conf for information how to connect to the hhvm fastcgi instance.

and then it stops there. I have done this on Ubuntu 14.04 and Debian 7 (and the Ubuntu LEMP image) but it never gets past this part. hhvm --version gives me 3.1.0 and i can run php commands with it so its gotta just be something with the fastcgi. I’ve been looking up how to deal with this but havent found any info on this problem (especially not in /etc/nginx/hhvm.conf)

Was wondering if anyone could help me with this

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

I had neither of those segments in my file to comment out. And upon adding the suggested lines I’m not seeing any difference. Any advice is appreciated. Thank you!

I followed the instructions, the system worked and I got a hip hop response on info.php, 1st time. When I cold start the server I have to restart the HHVM service to get results from info.php. Is there an explanation? thks!

At the beginning, I also missed this part. There are actually two blocks of FPM configurations you have to comment out. <pre>

location ~ .php$ {

try_files $uri =404;

fastcgi_split_path_info ^(.+.php)(/.+)$;

fastcgi_pass unix:/var/run/php5-fpm.sock;

fastcgi_index index.php;

include fastcgi_params;


pass the PHP scripts to FastCGI server listening on

#location ~ .php$ {

fastcgi_split_path_info ^(.+.php)(/.+)$;

# NOTE: You should have “cgi.fix_pathinfo = 0;” in php.ini

# With php5-cgi alone:


# With php5-fpm:

fastcgi_pass unix:/var/run/php5-fpm.sock;

fastcgi_index index.php;

include fastcgi_params;

#} </pre>