我在Ubuntu12.04LTS64中安装了一个LEMP服务器
惠特hvm fastcgi服务
我通过laravel.phar安装laravel(也通过composer测试)
在brwoser的get my site中不显示任何错误,但在chrome开发人员控制台中显示get error 500
在error.log文件(laravel-hhvm,nginx)中看不到任何错误
存储目录权限是777
我的nginx.conf和vhosts文件有基本配置
当我使用php cli或hhvm命令时,效果很好
谢谢你的帮助:)
我的位置块

location ~ \.(hh|php)$ {
fastcgi_split_path_info ^(.+\.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;

最佳答案

hhvm的问题是它没有显示太多错误,您必须继续观察hhvm或laravel错误日志。
您需要密切关注错误日志。HHVM不
默认情况下,向浏览器报告错误。
检查HHVM日志!

$ tail -n 50 -f /var/log/hhvm/error.log

检查你的拉维尔记录!
$ 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

07-28 01:43
查看更多