Setting up HHVM for apache2.2 with mod fastcgi in a virtual host
In my case I had to change RemoveHandler .php
into:
<FilesMatch "\.ph(p3?|tml)$">
SetHandler None
</FilesMatch>
<FilesMatch "\.phps$">
SetHandler None
</FilesMatch>
Related videos on Youtube
timing
Updated on September 18, 2022Comments
-
timing over 1 year
I want to setup a virtualhost running HHVM to try out the new "Facebook Hack" language. I followed the instructions here on Apache 2.2: https://github.com/facebook/hhvm/wiki/FastCGI
currently hhvm is running like this:
hhvm -m s -vServer.Type=fastcgi -vServer.Port=9001
And my virtualhost config is:
<VirtualHost *:80> ServerName example.com ServerAlias www.example.com DocumentRoot /home/tijmen/sites/example.com php_value engine off #<IfModule fastcgi_module> Alias /hhvm.fastcgi /home/tijmen/sites/example.com/hhvm.fastcgi FastCGIExternalServer /home/tijmen/sites/example.com/hhvm.fastcgi -host 127.0.0.1:9001 <Directory "/home/tijmen/sites/example.com/"> <Files "hhvm.fastcgi"> Order deny,allow </Files> </Directory> RemoveHandler .php AddHandler hhvm-hack-extension .hh AddHandler hhvm-php-extension .php Action hhvm-hack-extension /hhvm.fastcgi virtual Action hhvm-php-extension /hhvm.fastcgi virtual #</IfModule> ErrorLog /home/tijmen/sites/log/example.com-error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel debug CustomLog /home/tijmen/sites/log/example.com.log combined </VirtualHost>
The directory /home/tijmen/sites/example.com is set to chmod 777 to make sure it's writable. Will make it's more secure once this works.
However example.com/index.hh (which exists in /home/tijmen/sites/example.com/index.hh) returns a 404. Nowhere in the logs I can find out what is wrong.
Next to getting this thing running I would like to know what this hhvm.fastcgi file is. Do I have to create it manually? Is it even a physical file? Perhaps even a directory?
I've also asked my question here but the issue is closed: https://github.com/facebook/hhvm/issues/2137
-
timing about 10 yearsI understand it's an Alias of the path to this hhvm.fastcgi file, but still what is it? The file does not exist, I did not create it. No process seems to create it. So why bother pointing to it?
-
Josh Green about 10 years@timing: It's not a file--consider it like a variable whose scope is inside the *.conf. Note that had the Action not had the "virtual" modifier appended to the end of it, then Action would required that it physically existed.