I’m running nginx and hhvm on a ubuntu 14.04 droplet (provisioned by Forge). However, I can’t for the life of me get IPB to install. All I get is a blank page. There must be something very specific going on in the config since all my laravel instances work fine on the server. I can also die and dump in the installation and public index file so nginx is able to communicate with HHVM.
The log files don’t give out any warnings or errors. Perhaps I can get them to be more verbose?
Any help would be greatly appreciated
I have attached my nginx config file
server {
access_log off;
error_log /var/log/nginx/forums.animekyun.com-error_log warn;
listen 80;
server_name forums.animekyun.com www.forums.animekyun.com;
# static file configuration
location ~* .(gif|jpg|jpeg|png|ico|wmv|3gp|avi|mpg|mpeg|mp4|flv|mp3|mid|js|css|wml|swf)$ {
root /home/forge/forums.animekyun.com;
expires max;
add_header Pragma public;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
}
# site configuration
location / {
root /home/forge/forums.animekyun.com;
index index.php index.html index.htm;
# IPB configuration
try_files $uri $uri/ /index.php?q=$uri&$args;
}
# php-fpm configuration
location ~ .php$ {
root /home/forge/forums.animekyun.com;
try_files $uri =404;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_buffer_size 128k;
fastcgi_buffers 256 4k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
}
}
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.
HHVM can be a bit finicky at times, so the first thing I’d recommend is:
1). Shutdown HHVM; verify that no instances are running. 2). (Re)Install & Start PHP-FPM. Does it work as-is? If no; 3). Load your sites PHP-FPM configuration file and look at:
listen =
user =
group =
listen.allowed_clients
security.limit_extensions
;
and use valid extensions (which would be .php
).4). You’re defining the root directory in each location block which isn’t needed. Ideally, unless you’re defining aliases, root should only be defined once and it should be before your location blocks. So instead defining the same root in each location, remove all 3 instances and place a single instance below
server_name forums.animekyun.com www.forums.animekyun.com;
You should end up with the following (and all other instances removed):
server_name forums.animekyun.com www.forums.animekyun.com;
root /home/forge/forums.animekyun.com;
It’s also safe to remove:
index index.php index.html index.htm;
…from the server block and move it to nginx.conf unless your Droplet is setup to where you need to define this per site. If that’s the case, instead of defining it per location, move it to right below the root definition.
server_name forums.animekyun.com www.forums.animekyun.com;
root /home/forge/forums.animekyun.com;
index index.php index.html index.htm;
The other thing that popped out when looking over the server block was that in most all configurations I’ve dealt with, there’s a \
before the .
in the location block for PHP. So instead of using:
location ~ .php$ {
use:
location ~ \.php$ {
Altogether this would give you a final modified configuration that looks like:
server {
listen 80;
server_name forums.animekyun.com www.forums.animekyun.com;
root /home/forge/forums.animekyun.com;
index index.php index.html index.htm;
access_log off;
error_log /var/log/nginx/forums.animekyun.com-error_log warn;
# static file configuration
location ~* .(gif|jpg|jpeg|png|ico|wmv|3gp|avi|mpg|mpeg|mp4|flv|mp3|mid|js|css|wml|swf)$ {
expires max;
add_header Pragma public;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
}
# site configuration
location / {
# IPB configuration
try_files $uri $uri/ /index.php?q=$uri&$args;
}
# php-fpm configuration
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_buffer_size 128k;
fastcgi_buffers 256 4k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
}
}
If none of that works, while PHP-FPM is running, check your error log and see if anything is popping up.
Click below to sign up and get $100 of credit to try our products over 60 days!
IP.Board 4 supports hhvm according to the developers
A lot of PHP Solutions don’t work without modification on HHVM as HHVM cuts a lot of corners and tweaks the functionalities of PHP. Contact IPBoard Support to see if they even support HHVM or not. If not then your trying is for nothing