I’ve been reading about HHVM tonight, and I’d like to try it out myself. From what I’m gathering, it’s as simple as installing HHVM, and then configuring a server block to use it instead of php-fpm (then running “/usr/share/hhvm/install_fastcgi.sh”, right?). So before giving myself a headache, I thought I’d ask a preemptive question.
This is my current server block:
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /var/www/anightinburlington.com/public_html;
index index.php index.html index.htm;
server_name anightinburlington.com www.anightinburlington.com;
location / {
# try_files $uri $uri/ =404;
try_files $uri $uri/ /wordpress$uri/ /index.php?q=$uri&$args;
}
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;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
# W3 TOTAL CACHE
}
I’ve only ever really configured these files once (relatively new to VPS, and I learned a LOT at once when I set this all up). That being said, I needed to use this line to get my permalinks with Wordpress to work properly:
try_files $uri $uri/ /wordpress$uri/ /index.php?q=$uri&$args;
I believe this was because I contained my Wordpress installation within a Wordpress folder (var/www/site.com/public_html/wordpress/), rather than use the root. So my question is, how do I go about configuring HHVM with that in place? A lot of guides I’m seeing are saying to comment out all of the old server block code, which would undo my permalink alteration. Any ideas?
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.
Click below to sign up and get $100 of credit to try our products over 60 days!
Thanks for the config file, that should work. I tried this out just now, and got the following error:
I’m not loading any other config files to my knowledge, nor doing anything fancy, so I’m not sure what’s wrong here. Any idea what could cause this, and what I might do to remedy it?
Give this a whirl
This way all you should need to do is start up HHVM, give NGINX a reload and you’ll be good to go!