1

I installed Nginx 1.8 (compiled from source) on Debian 7:

cd /opt/
sudo wget http://nginx.org/download/nginx-1.8.0.tar.gz
sudo wget http://labs.frickle.com/files/ngx_cache_purge-2.3.tar.gz
sudo tar -zxvf nginx-1.8.0.tar.gz
sudo tar -zxzf ngx_cache_purge-2.3.tar.gz
cd /opt/nginx-1.8.0/

sudo ./configure --prefix=/opt/nginx --user=nginx --group=nginx --with-http_ssl_module --with-ipv6 --add-module=/tmp/ngx_cache_purge-2.3

sudo make && make install
sudo adduser --system --no-create-home --disabled-login --disabled-password --group nginx 

sudo wget -O init-deb.sh http://www.linode.com/docs/assets/1538-init-deb.sh
sudo mv init-deb.sh /etc/init.d/nginx
sudo chmod +x /etc/init.d/nginx
sudo /usr/sbin/update-rc.d -f nginx defaults 

Than I start nginx with the following command:

sudo /etc/init.d/nginx start

And everything works fine until now.

The problem is when I try to install HHVM it doesn't work:

sudo wget -O - http://dl.hhvm.com/conf/hhvm.gpg.key | sudo apt-key add -
sudo echo deb http://dl.hhvm.com/debian wheezy main | sudo tee /etc/apt/sources.list.d/hhvm.list
sudo apt-get update
sudo apt-get install hhvm libgmp-dev libmemcached-dev
sudo update-rc.d hhvm defaults

And when I finally run:

sudo /usr/share/hhvm/install_fastcgi.sh

I get the following error:

Checking if Nginx is installed
Nginx not found

Any thoughts how I can install HHVM with Nginx compiled from source?

  • 1
    Debian is based on packages. By compiling your own stuff outside the package management system you are in unsupported (and unsupportable) land. – Deer Hunter Apr 26 '15 at 19:40
  • What do you suggest? Can I move to other Linux Distribution? – Speedwheel Apr 26 '15 at 19:52
  • 1
    No, install NGinx from Debian repository. Is there a reason why you compiled NGinx from source ? – krisFR Apr 26 '15 at 20:20
  • Because the one from repository is version 1.2.1 which is like 3 years old, the one I compiled is 1.8.0 which is the latest version. – Speedwheel Apr 26 '15 at 20:27
  • Debian is now not what it was...Most packages are depreciated for years...:( My own feeling is that it dies slowly...[cries] Regarding source code for install_fastcgi.sh : it raised Nginx not found if directory /etc/nginx/conf.d/ cannot be found... github.com/hhvm/packaging/blob/master/hhvm/deb/skeleton/usr/… Maybe you can adjust this manually – krisFR Apr 26 '15 at 21:31
0

The script generally fails when it tries to find this file:

/etc/nginx/conf.d/

Whis in my case(and I'm assuming yours) does not exist.

All you need to do is add this line to your server block in nginx.conf

include /etc/nginx/hhvm.conf;

Just make sure the hhvm.conf file is in the /etc/nignx directory. Retart nginx and hhvm

sudo /etc/init.d/hhvm restart

Then you should be good to go. To test it i used this file (phpinfo for hhvm) https://gist.github.com/ck-on/67ca91f0310a695ceb65

Good luck.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.