HHVM 的问题是它没有显示太多错误,您必须继续查看 HHVM 或 Laravel 错误日志。
您需要密切注意错误日志。HHVM 默认不向浏览器报告错误。
检查 HHVM 日志!
$ tail -n 50 -f /var/log/hhvm/error.log
检查你的 Laravel 日志!
$ tail -n 50 -f /path/to/laravel/app/storage/logs/laravel.log
配置参考
/etc/nginx/hhvm.conf
如果文件尚不存在,则创建一个文件。插入ff:
location ~ \.(hh|php)$ {
fastcgi_keep_conn on;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
然后将其包含在您的 nginx 虚拟主机配置中。
例如。/etc/nginx/sites-available/laravel
现在为 Laravel 添加这个,根据需要进行编辑:
server {
listen 80 default_server;
root /vagrant/laravel/public;
index index.html index.htm index.php;
server_name localhost;
access_log /var/log/nginx/localhost.laravel-access.log;
error_log /var/log/nginx/locahost.laravel-error.log error;
charset utf-8;
location / {
try_files \$uri \$uri/ /index.php?\$query_string;
}
location = /favicon.ico { log_not_found off; access_log off; }
location = /robots.txt { log_not_found off; access_log off; }
error_page 404 /index.php;
include hhvm.conf; # INCLUDE HHVM HERE
# Deny .htaccess file access
location ~ /\.ht {
deny all;
}
}
然后重新加载 Nginx:
$ sudo service nginx reload