Ubuntu 14.04 + HHVM + Mysql + Apache – 404 File Not Found

Posted: May 21, 2014 in web

Setup LAMP Server:

$ sudo tasksel install lamp-server

Prep HHVM:

$ sudo apt-get update
$ sudo apt-get install -y unzip vim git-core curl wget build-essential python-software-properties

Install HHVM:

$ wget -O – http://dl.hhvm.com/conf/hhvm.gpg.key | sudo apt-key add –
$ echo deb http://dl.hhvm.com/ubuntu trusty main | sudo tee /etc/apt/sources.list.d/hhvm.list
$ sudo apt-get update
$ sudo apt-get install -y hhvm

Setup FastCGI

$ sudo /usr/share/hhvm/install_fastcgi.sh

Some restart
$ sudo update-rc.d hhvm defaults
$ sudo service hhvm restart

For php-cli

$ sudo /usr/bin/update-alternatives –install /usr/bin/php php /usr/bin/hhvm 60

Check Version
$ php -v

HipHop VM 3…. (rel)
….

Change Apache config file:

$ sudo nano /etc/apache2/apache2.conf

Add:

....
<Directory /usr/share>
 AllowOverride None
 Require all granted
</Directory>

## for some reason i need to add this to resolve "404 File Not Found"
<VirtualHost *:80>
        DocumentRoot /var/www/html
        ProxyPass / fcgi://127.0.0.1:9000/var/www/html
</VirtualHost>
.....

$ sudo service apache2 restart
Remove PHP:

$ sudo apt-get remove php*
$ sudo apt-get autoremove

Thanks to:
http://fideloper.com/hhvm-nginx-laravel
http://www.codepunker.com/blog/how-to-install-hhvm-with-apache-and-fastcgi-on-ubuntu-13

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s