Make nginx use PHP-FPM instead of HHVM for specific script

I am loving HHVM but there is issue with one WP plugin(justified image grid) which uses TIMTHUMB to resize images and this one doesn’t seem to play with HHVM.

I am using fallback like this:

But it doesn’t work.

Is it possible to make an exception and make timthumb.php file use only PHP-FPM?


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

i think u can get necessary help by following this:

[and it might be best way to use fallback]

It works but I think that now it’s using PHP for everything. Before it looked like this

upstream hhvm {
        server unix:/var/run/hhvm/hhvm.sock;

upstream php {
        server unix:/var/run/php5-fpm.sock;

Edit the upstream directive of hhvm and set PHP FPM as a backup server:

upstream hhvm {
    server unix:/run/php5-fpm.sock backup;