In / etc / apache2 / ports.conf add ...
Listen 8080
Then, to your vhost configuration (since you are using localhost as your domain, possibly / etc / apache 2 / sites-available / default.conf), copy everything there and paste it right below so that you have a second instance of VirtualHost. In the second case, change the value of *: 80 to *: 8080, then add your ProxyPassMatch to say that you want to use HHVM to expand hh and php files (do not forget to upgrade to the correct directory).
It should look something like this ...
<VirtualHost *:80> ... keep the same ... </VirtualHost> <VirtualHost *:8080> ... keep the same ... ProxyPassMatch ^/(.+\.(hh|php)(/.*)?)$ fcgi://127.0.0.1:9000/var/www/$1 </VirtualHost>
Go to / etc / apache 2 / mods-available / hhvm_proxy_fcgi.conf and comment out what is there. Otherwise, everything will be directed to HHVM.
Finally restart apache
sudo service apache2 restart
I quickly tested this on an existing local site and it redirected back 80 of the 8080 that it had to do. If this does not work, let me know.
UPDATE: Tested a bit more, and it looks like this will work for you. After adding the following, the jump between local.site.com/hhvm.php and local.site.com:8080/hhvm.php correctly reflected the echo.
<?php if (defined('HHVM_VERSION')) { echo "golden!"; } else { echo "doh..."; }
source share