I install a LEMP server in ubuntu 12.04 LTS 64
whit HHVM Fastcgi Service
and i install laravel via laravel.phar ( and test via composer too )
when in get my site in brwoser do not display any error but in chrome developer console get error 500
![enter image description here](https://i.stack.imgur.com/1zTPh.png)
我在 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
检查你的 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 虚拟主机配置中。
eg. /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
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)